From nobody Thu Feb 10 20:42:02 2022 X-Original-To: dev-commits-src-main@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 A78AC19CD848; Thu, 10 Feb 2022 20:42:02 +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 4JvpZf4Mw0z3w7q; Thu, 10 Feb 2022 20:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644525722; 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=eKNsk8kiE/Hg5+ySycJSEtR+OGYWYaLbz/ZewqkBGto=; b=dpxlIEVMI8Dfc66l8Ff+d6BLe0RDLn22Um/n4nbDVUXrbk5I68pjnWHQ9I+Oc3xT8GwQUP GuJhZRJEF1Xzv3ExBdng5924Jv57GWfTVltUQDfz+lTE/N1LZRTYgvW2RMSbv7r4Q0e57y ConX7mro6XhIEw0gsyqhLJJGopDkO3tKYUWXoa3qTIog7xDDaf5rVM//uEQhIQ5TK1r+yQ gS6dQ9E0LrOQ7r97D0ZY69crgApfPT5wttczX2rwQ3jC/Doe7rkeYNh4ZQTRLGucloMJRD qGmeTV81wEudU8ZfAa9ifm5UZaXel5lo6VjFF4EzI6FUTPvKaBQooyd0kTSEpw== 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 75E96271BB; Thu, 10 Feb 2022 20:42:02 +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 21AKg2G7014655; Thu, 10 Feb 2022 20:42:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21AKg2qb014654; Thu, 10 Feb 2022 20:42:02 GMT (envelope-from git) Date: Thu, 10 Feb 2022 20:42:02 GMT Message-Id: <202202102042.21AKg2qb014654@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b4f60fab5d3f - main - tcp: Avoid conditionally defined fields in union lro_address List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4f60fab5d3fdd2ea51c1151fa79b2c541c6b81a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644525722; 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=eKNsk8kiE/Hg5+ySycJSEtR+OGYWYaLbz/ZewqkBGto=; b=X1GkL7JzUqnMZiDSJXu0GEv4bHpcVYRiao4ItcbsdUP9+EQh723A2WpU/s8TDL1hKkcaM5 vAUvfKldfnZj8AwuhtYsimTUSCjb+48kgdJ0j+WOPKhzPwv1vfkY51OugIDPxl+b0pHOpg Al3zilcJ26iU4XjR1DR7jkhESqAanHogvdJJeECTJeSANGamQ3xW2FsvvuHJvdheWj7bKt vIy2GpRc7o9y68LqaHIAAtsjpNUAoEBVC+d41qRs+vcpGCKwdlvTh/jpuK1dqUnUdFuM8c L1D1Snyz/+CqtujHwbV3uqkL8OrP4txPzRAQehBo2k1BKJG2Q2UmIxkPLJwlww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644525722; a=rsa-sha256; cv=none; b=pumZhtypz/3rWQKiWWeQccxfGuMWDYIDUr8Pw6skQ5Nq4ODpeY2npEVa9ul3LeZM1y9NHZ RnDOTlvMdF7IxDK4G18C7dngvrD9h9s5ipY5Q8tMm3ZDiw+G7QxnfBnSbUEo3P43dYIFnB ZrGh9rnCTF/2U+4jzWh8TUvn5h4VWf40Ge1DD5NOB+ecTVyfDnq2OOkH+6wa52SP4VQjwq adrEQnq+9hGkXNwwf+a9gvdX/Ba46wZtUxnw2IoMD/ZV901MMt6dW4cAthSyC/4NWAYZTL fpOU2IUBsyxs0H3/IGjYky6tydzYNaee+08aelyE1ilnAeRAJVA3RGr2rhzRGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b4f60fab5d3fdd2ea51c1151fa79b2c541c6b81a commit b4f60fab5d3fdd2ea51c1151fa79b2c541c6b81a Author: Mark Johnston AuthorDate: 2022-02-10 20:31:26 +0000 Commit: Mark Johnston CommitDate: 2022-02-10 20:39:58 +0000 tcp: Avoid conditionally defined fields in union lro_address The layout of the structure ends up depending on whether the including file includes opt_inet.h and opt_inet6.h, so different compilation units can end up seeing different versions of the structure. Fix this by unconditionally defining the address fields. As a side effect, this eliminates some duplication in the kernel's CTF type graph. Reviewed by: rscheff, tuexen MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34242 --- sys/netinet/tcp_lro.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/netinet/tcp_lro.h b/sys/netinet/tcp_lro.h index dd2aa1148822..427657df47e7 100644 --- a/sys/netinet/tcp_lro.h +++ b/sys/netinet/tcp_lro.h @@ -34,6 +34,7 @@ #define _TCP_LRO_H_ #include +#include #ifndef TCP_LRO_ENTRIES /* Define default number of LRO entries per RX queue */ @@ -80,20 +81,12 @@ union lro_address { uint16_t d_port; /* destination TCP/UDP port */ uint32_t vxlan_vni; /* VXLAN virtual network identifier */ union { -#ifdef INET struct in_addr v4; -#endif -#ifdef INET6 struct in6_addr v6; -#endif } s_addr; /* source IPv4/IPv6 address */ union { -#ifdef INET struct in_addr v4; -#endif -#ifdef INET6 struct in6_addr v6; -#endif } d_addr; /* destination IPv4/IPv6 address */ }; } __aligned(sizeof(u_long));