From nobody Sat Apr 9 00:27:49 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 18D2B1AABAB6; Sat, 9 Apr 2022 00:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZwtt1h1kz3p7b; Sat, 9 Apr 2022 00:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649464070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MG9tjR0j9NnxeGbAM8fz7IUBCh1nU6/YfAq5FvpKAGA=; b=yskgRU+e8YX/DbeSGTRi6zY9KJlJfCrILFUBAztOOe0Y9NS97/32cb4vBhFTorZ6AA79LO pO4/IaVloXegZekHQxYON97zFvgLO3g0r/A4R7Ul/T6dv+A+WQZlxoni+U1Rg0GI0qYp1r 9k1s1n9GbqJSMTngvG00rCJC3S4T6cQ3qF1SGJJIZ6Kq2e1177HASNmcy4otxPEJWVddBM qnYFdqG0LLm1BvDvXGMZTChaV0tBmho3DuTGC2km4GNl1kWkgiQxyZtB4aS6KfyI70UCM/ Yuywf+DNBM4IrsGSO/imtRRCBeIp+4J3epoQEHCkgND54P+J2q+YVAKmAglj6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BADD874DE; Sat, 9 Apr 2022 00:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2390RnjN056501; Sat, 9 Apr 2022 00:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2390Rn1t056500; Sat, 9 Apr 2022 00:27:49 GMT (envelope-from git) Date: Sat, 9 Apr 2022 00:27:49 GMT Message-Id: <202204090027.2390Rn1t056500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3b994db74b75 - main - Use stub inline functions for no-op versions of tcp_fastopen*(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b994db74b75551d5ab6cc3df5d3b51d3347032b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649464070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MG9tjR0j9NnxeGbAM8fz7IUBCh1nU6/YfAq5FvpKAGA=; b=Wg4cfUfTOUV3ln3Z8UQU2UWH7D+JLsh8U76+UzsxQgRVLHMGnx8EgubMqSj1psqVacb8Kk CDbR4mpuloEqYcTuUqI+rSDTj+q16fi4TUzJqsLSbu88RQluuAliMWBuEBSyLZ3LO07fSo YYDUu5v9xBWsmdf7eGcNQb6ou2/gxwB2Qf8FL5sRZXboqmbO0yz8sstkx5i4B7EuR1bNz+ hPStvI9J20zKxCLHSRs12/VmvAt0TNBO+Ho3Rer8L0qZcQAma2vX05a/l8qTKttEm/I0rl VqOy/zB6ZtTMOli4TeGY5aob8djswoXl2Ll+Z4ripBNBYXAvd2+gE4Kvr9PBwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649464070; a=rsa-sha256; cv=none; b=vRCrJZGCYe3bv9PMAw2wqAJLHPWZTsQZ3CGP+VURpcV/Ig2nuY/8OwOk8x9hh6GGIIxOEz BeTFcdVIrwFnMCMPkc2H7lJSWlsX4aGQy+6orBUFsq3K4duhl6k+l3xyvHsEwL/IfQmibJ hZtBG91e0REQcic2EHmvezMIUmeVDnc1rJvyyEzBLCDAcKd4P2vJr2pMSqZvoV0n7CA5sa 2ZObE0/l3JJ1lwZGUVhSuyUidQl5Y1ZKq/1sHJD/zRVfFq2ZX19Qa9PuhGGGdJbjRLeuR+ 1vkzsfL0GDrl2YfvvhqFqqCUOFCwFQqQO0BNd1ofuDig/eWSGnAOB05De1oZ6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3b994db74b75551d5ab6cc3df5d3b51d3347032b commit 3b994db74b75551d5ab6cc3df5d3b51d3347032b Author: John Baldwin AuthorDate: 2022-04-09 00:25:13 +0000 Commit: John Baldwin CommitDate: 2022-04-09 00:25:13 +0000 Use stub inline functions for no-op versions of tcp_fastopen*(). Inline functions "use" variables passed as arguments unlike empty macros appeasing compiler warnings about unused variables. --- sys/netinet/tcp_fastopen.h | 51 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/sys/netinet/tcp_fastopen.h b/sys/netinet/tcp_fastopen.h index 5db10b00df48..f00bc87644f9 100644 --- a/sys/netinet/tcp_fastopen.h +++ b/sys/netinet/tcp_fastopen.h @@ -93,14 +93,49 @@ void tcp_fastopen_disable_path(struct tcpcb *); void tcp_fastopen_update_cache(struct tcpcb *, uint16_t, uint8_t, uint8_t *); #else -#define tcp_fastopen_init() ((void)0) -#define tcp_fastopen_destroy() ((void)0) -#define tcp_fastopen_alloc_counter() NULL -#define tcp_fastopen_decrement_counter(c) ((void)0) -#define tcp_fastopen_check_cookie(i, c, l, lc) (-1) -#define tcp_fastopen_connect(t) ((void)0) -#define tcp_fastopen_disable_path(t) ((void)0) -#define tcp_fastopen_update_cache(t, m, l, c) ((void)0) +static __inline void +tcp_fastopen_init(void) +{ +} + +static __inline void +tcp_fastopen_destroy(void) +{ +} + +static __inline unsigned int * +tcp_fastopen_alloc_counter(void) +{ + return (NULL); +} + +static __inline void +tcp_fastopen_decrement_counter(unsigned int *_counter) +{ +} + +static __inline int +tcp_fastopen_check_cookie(struct in_conninfo *_inc, uint8_t *_cookie, + unsigned int _len, uint64_t *_latest_cookie) +{ + return (-1); +} + +static __inline void +tcp_fastopen_connect(struct tcpcb *_tp) +{ +} + +static __inline void +tcp_fastopen_disable_path(struct tcpcb *_tp) +{ +} + +static __inline void +tcp_fastopen_update_cache(struct tcpcb *_tp, uint16_t _mss, uint8_t _cookie_len, + uint8_t *_cookie) +{ +} #endif /* TCP_RFC7413 */ #endif /* _KERNEL */