[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <514ca303-149a-4f7e-a473-31051fb7162b@redhat.com>
Date: Wed, 16 Jul 2025 10:33:33 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: "Chia-Yu Chang (Nokia)" <chia-yu.chang@...ia-bell-labs.com>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"corbet@....net" <corbet@....net>, "horms@...nel.org" <horms@...nel.org>,
"dsahern@...nel.org" <dsahern@...nel.org>,
"kuniyu@...zon.com" <kuniyu@...zon.com>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"dave.taht@...il.com" <dave.taht@...il.com>,
"jhs@...atatu.com" <jhs@...atatu.com>, "kuba@...nel.org" <kuba@...nel.org>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"davem@...emloft.net" <davem@...emloft.net>,
"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
"donald.hunter@...il.com" <donald.hunter@...il.com>,
"ast@...erby.net" <ast@...erby.net>,
"liuhangbin@...il.com" <liuhangbin@...il.com>,
"shuah@...nel.org" <shuah@...nel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"ij@...nel.org" <ij@...nel.org>, "ncardwell@...gle.com"
<ncardwell@...gle.com>,
"Koen De Schepper (Nokia)" <koen.de_schepper@...ia-bell-labs.com>,
"g.white@...lelabs.com" <g.white@...lelabs.com>,
"ingemar.s.johansson@...csson.com" <ingemar.s.johansson@...csson.com>,
"mirja.kuehlewind@...csson.com" <mirja.kuehlewind@...csson.com>,
"cheshire@...le.com" <cheshire@...le.com>, "rs.ietf@....at"
<rs.ietf@....at>, "Jason_Livingood@...cast.com"
<Jason_Livingood@...cast.com>, "vidhi_goel@...le.com" <vidhi_goel@...le.com>
Subject: Re: [PATCH v12 net-next 12/15] tcp: accecn: AccECN option send
control
On 7/15/25 5:14 PM, Chia-Yu Chang (Nokia) wrote:
>> On 7/4/25 10:53 AM, chia-yu.chang@...ia-bell-labs.com wrote:
>>> @@ -285,9 +297,33 @@ static inline void
>>> tcp_ecn_received_counters(struct sock *sk,
>>>
>>> if (len > 0) {
>>> u8 minlen =
>>> tcp_ecnfield_to_accecn_optfield(ecnfield);
>>> + u32 oldbytes = tp->received_ecn_bytes[ecnfield -
>>> + 1];
>>> +
>>> tp->received_ecn_bytes[ecnfield - 1] += len;
>>> tp->accecn_minlen = max_t(u8, tp->accecn_minlen,
>>> minlen);
>>> +
>>> + /* Demand AccECN option at least every 2^22 bytes to
>>> + * avoid overflowing the ECN byte counters.
>>> + */
>>> + if ((tp->received_ecn_bytes[ecnfield - 1] ^ oldbytes) &
>>> + ~((1 << 22) - 1)) {
>>
>> I don't understand the above statement, I don't think it yield the result expected according to the above comment.
>
> Hi Paolo,
>
> I was thinking to change it into GENMASK_U32() and comments like below.
>
> It is intended to send AccECN option at least once per 2^22-byte increase in the counter.
Ok, I see it now. Please mention explicitly the above in the comment and
test just the 22 bit.
/P
Powered by blists - more mailing lists