Thread (26 messages) flat view 26 messages, 4 authors, 2026-01-23

RE: [PATCH v10 net-next 13/15] tcp: accecn: add tcpi_ecn_mode and tcpi_option2 in tcp_info

From: Chia-Yu Chang (Nokia) <hidden>
Date: 2026-01-21 19:08:14
Also in: bpf, linux-doc, linux-kselftest

-----Original Message-----
From: Eric Dumazet <edumazet@google.com> 
Sent: Wednesday, January 21, 2026 3:58 PM
To: Chia-Yu Chang (Nokia) <redacted>
Cc: pabeni@redhat.com; parav@nvidia.com; linux-doc@vger.kernel.org; corbet@lwn.net; horms@kernel.org; dsahern@kernel.org; kuniyu@google.com; bpf@vger.kernel.org; netdev@vger.kernel.org; dave.taht@gmail.com; jhs@mojatatu.com; kuba@kernel.org; stephen@networkplumber.org; xiyou.wangcong@gmail.com; jiri@resnulli.us; davem@davemloft.net; andrew+netdev@lunn.ch; donald.hunter@gmail.com; ast@fiberby.net; liuhangbin@gmail.com; shuah@kernel.org; linux-kselftest@vger.kernel.org; ij@kernel.org; ncardwell@google.com; Koen De Schepper (Nokia) <redacted>; g.white@cablelabs.com; ingemar.s.johansson@ericsson.com; mirja.kuehlewind@ericsson.com; cheshire <redacted>; rs.ietf@gmx.at; Jason_Livingood@comcast.com; Vidhi Goel <redacted>
Subject: Re: [PATCH v10 net-next 13/15] tcp: accecn: add tcpi_ecn_mode and tcpi_option2 in tcp_info


CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.



On Wed, Jan 21, 2026 at 3:3 PM [off-list ref] wrote:
quoted
From: Chia-Yu Chang <redacted>

Add 2-bit tcpi_ecn_mode feild within tcp_info to indicate which ECN 
mode is negotiated: ECN_MODE_DISABLED, ECN_MODE_RFC3168, 
ECN_MODE_ACCECN, or ECN_MODE_PENDING. This is done by utilizing 
available bits from tcpi_accecn_opt_seen (reduced from 16 bits to 2 
bits) and tcpi_accecn_fail_mode (reduced from 16 bits to 4 bits).

Also, an extra 24-bit tcpi_options2 field is identified to represent 
newer options and connection features, as all 8 bits of tcpi_options 
field have been used.

Signed-off-by: Chia-Yu Chang <redacted>
Co-developed-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
---
 +
quoted
 struct tcp_info {
        __u8    tcpi_state;
        __u8    tcpi_ca_state;
@@ -316,15 +334,17 @@ struct tcp_info {
                                         * in milliseconds, including any
                                         * unfinished recovery.
                                         */
-       __u32   tcpi_received_ce;    /* # of CE marks received */
+       __u32   tcpi_received_ce;    /* # of CE marked segments received */
        __u32   tcpi_delivered_e1_bytes;  /* Accurate ECN byte counters */
        __u32   tcpi_delivered_e0_bytes;
        __u32   tcpi_delivered_ce_bytes;
        __u32   tcpi_received_e1_bytes;
        __u32   tcpi_received_e0_bytes;
        __u32   tcpi_received_ce_bytes;
-       __u16   tcpi_accecn_fail_mode;
-       __u16   tcpi_accecn_opt_seen;
+       __u32   tcpi_ecn_mode:2,
+               tcpi_accecn_opt_seen:2,
+               tcpi_accecn_fail_mode:4,
+               tcpi_options2:24;
 };
I guess this is fine, iproute2 got no support yet for tcpi_accecn_fail_mode / tcpi_accecn_opt_seen

Reviewed-by: Eric Dumazet <edumazet@google.com>

BTW, are you planning to patch iproute2 misc/ss soon ?
Yes, after these patches are accepted in net-next, we plan to patch new fields into iproute2-next & packetdrill.

Chia-Yu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help