From nobody Wed Jan 03 18:32:56 2024 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 4T4yyK3Fhdz56RL9; Wed, 3 Jan 2024 18:32:57 +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 4T4yyK1KD4z41mK; Wed, 3 Jan 2024 18:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704306777; 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=u75BhSl0kRRCF9MRweaIExKuoiCV0KjBSKMOJVVrovE=; b=wvK9ccOrQW/CTK0K6h5sRsxuh4KoCVCa1hDDRHX4Er601SB6ydrqvk0A/lSEHpGqxDLUxt oWKZ0NNeoKC66A5F88/srlVW1uZ7Ojccf0sW7x2gUSFFH6daQXmBYb3TT1qK0fRCMbHnwn IB8WOg206F/O0Jqk9P8jMANXiBnFExDwLfiJdOIbbXpXBKobYHewsRPVtbYubD6adJPjUB 9pi7SEvHdOdzyvrUVOg0887ny+Sq/4BhjvqzI6QTPXlTQHTnWmdBzaYthH7rtgT4JGTMNW akRm41LSZNl0csqMYlX7idITjgyswXTqJWxIq1LxsENIZCDBAfpM+6Ua16/NPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704306777; 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=u75BhSl0kRRCF9MRweaIExKuoiCV0KjBSKMOJVVrovE=; b=nSuPvvFSOduLPWfTpdkUTlStlS4VAsQWwazl/RNXUKPmZob0O2ffa1o+gJ7kcxhqg9dPfS wPFQb5QS2bsYg6DIA1jftwCJoz7nRtQChf9SzsYdYcjkseSPuxQR8t7dB1HaKlv4hrCKjH lcECqs+vVjroFoWIcGv2pWk7OS6HpFivci1ryNBVGG7E0OktWzJKUSu7EeJyl9Vs+9ea6f /+SYEmL862FspHTnqzI51D4/PGLnlfRvIxJoufdV2P1NXahnEp/8Z0rXgo85uZ4lI+cIzk F5BMOyaapCVx0yDULfEkZEyhhlhWiCNJa/b4W3i6K2/zyNXyKQZVwiVd0OukNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704306777; a=rsa-sha256; cv=none; b=pDbivSmcMgO78YSlIhJuGKpGmK8Zirq5A5lUTrqpmYHTvqUXvkhwVZjU+lFbCatsu8VqZz gWaWS58Eko2DByBSxACBiatubw7VV0bm3XtZ+DiIe1D5yZz+zykuglvyJvBOriCRVwF9Qu hsrGXI4ZWnFqHiAMNbdN86EwiSLltycgB0L3xQCE+nefmbzD1kXj1dWNGHSkV/4PtFMV8a 1EeGyErjWRFmyg6b8StBXHA4jXQbeCdHZKxBiWI2jGrPfLb3MbpLYiLJmmq5rVfjca+ZFf pHj2iVrk4m7DWvDaXnvW27xmWlHEFnGzNOdeptnoaGu2/gTIdbMYEIAeJF2EBg== 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 4T4yyK0QbXzvp7; Wed, 3 Jan 2024 18:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 403IWvCZ018912; Wed, 3 Jan 2024 18:32:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 403IWu1A018909; Wed, 3 Jan 2024 18:32:56 GMT (envelope-from git) Date: Wed, 3 Jan 2024 18:32:56 GMT Message-Id: <202401031832.403IWu1A018909@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: b0e13f785b33 - main - netinet: Define IPv6 ECN mask 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: b0e13f785b336670bdf39b83a78435b00d00f43c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b0e13f785b336670bdf39b83a78435b00d00f43c commit b0e13f785b336670bdf39b83a78435b00d00f43c Author: Jose Luis Duran AuthorDate: 2023-10-28 02:50:18 +0000 Commit: Mark Johnston CommitDate: 2024-01-03 17:56:28 +0000 netinet: Define IPv6 ECN mask Define a mask for the code point used for ECN in the Traffic Class field (2 bits) of an IPv6 header. BE: 0 0 3 0 0 0 0 0 Bit: 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| Traffic Class | Flow Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | For BE (Big Endian), or network-byte order, this corresponds to 0x00300000. For Little Endian, it corresponds to 0x00003000. Reviewed by: imp, markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/879 --- sys/netinet/ip6.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index 9807e6a1780a..2f61d594e59d 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -95,10 +95,12 @@ struct ip6_hdr { #if BYTE_ORDER == BIG_ENDIAN #define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */ +#define IPV6_ECN_MASK 0x00300000 /* ECN code point (2 bits) */ #else #if BYTE_ORDER == LITTLE_ENDIAN #define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */ #define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */ +#define IPV6_ECN_MASK 0x00003000 /* ECN code point (2 bits) */ #endif /* LITTLE_ENDIAN */ #endif #define IPV6_FLOWLABEL_LEN 20