From: Paolo Abeni <pabeni@redhat.com>
To: "Chia-Yu Chang (Nokia)" <chia-yu.chang@nokia-bell-labs.com>,
"edumazet@google.com" <edumazet@google.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"horms@kernel.org" <horms@kernel.org>,
"dsahern@kernel.org" <dsahern@kernel.org>,
"kuniyu@amazon.com" <kuniyu@amazon.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"dave.taht@gmail.com" <dave.taht@gmail.com>,
"jhs@mojatatu.com" <jhs@mojatatu.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"davem@davemloft.net" <davem@davemloft.net>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"donald.hunter@gmail.com" <donald.hunter@gmail.com>,
"ast@fiberby.net" <ast@fiberby.net>,
"liuhangbin@gmail.com" <liuhangbin@gmail.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"ij@kernel.org" <ij@kernel.org>,
"ncardwell@google.com" <ncardwell@google.com>,
"Koen De Schepper (Nokia)" <koen.de_schepper@nokia-bell-labs.com>,
"g.white@cablelabs.com" <g.white@cablelabs.com>,
"ingemar.s.johansson@ericsson.com"
<ingemar.s.johansson@ericsson.com>,
"mirja.kuehlewind@ericsson.com" <mirja.kuehlewind@ericsson.com>,
"cheshire@apple.com" <cheshire@apple.com>,
"rs.ietf@gmx.at" <rs.ietf@gmx.at>,
"Jason_Livingood@comcast.com" <Jason_Livingood@comcast.com>,
"vidhi_goel@apple.com" <vidhi_goel@apple.com>
Subject: Re: [PATCH v12 net-next 12/15] tcp: accecn: AccECN option send control
Date: Wed, 16 Jul 2025 10:33:33 +0200 [thread overview]
Message-ID: <514ca303-149a-4f7e-a473-31051fb7162b@redhat.com> (raw)
In-Reply-To: <PAXPR07MB7984D6FA40FF000E51F694F3A357A@PAXPR07MB7984.eurprd07.prod.outlook.com>
On 7/15/25 5:14 PM, Chia-Yu Chang (Nokia) wrote:
>> On 7/4/25 10:53 AM, chia-yu.chang@nokia-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
next prev parent reply other threads:[~2025-07-16 8:33 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 8:53 [PATCH v12 net-next 00/15] AccECN protocol patch series chia-yu.chang
2025-07-04 8:53 ` [PATCH v12 net-next 01/15] tcp: reorganize SYN ECN code chia-yu.chang
2025-07-04 8:53 ` [PATCH v12 net-next 02/15] tcp: fast path functions later chia-yu.chang
2025-07-04 8:53 ` [PATCH v12 net-next 03/15] tcp: reorganize tcp_sock_write_txrx group for variables later chia-yu.chang
2025-07-04 8:53 ` [PATCH v12 net-next 04/15] tcp: ecn functions in separated include file chia-yu.chang
2025-07-14 11:20 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 05/15] tcp: AccECN core chia-yu.chang
2025-07-04 8:53 ` [PATCH v12 net-next 06/15] tcp: accecn: AccECN negotiation chia-yu.chang
2025-07-14 13:10 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 07/15] tcp: Add wait_third_ack for ECN negotiation in simultaneous connect chia-yu.chang
2025-07-14 13:22 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 08/15] tcp: accecn: add AccECN rx byte counters chia-yu.chang
2025-07-14 13:30 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 09/15] tcp: accecn: AccECN needs to know delivered bytes chia-yu.chang
2025-07-14 13:33 ` Paolo Abeni
2025-07-15 9:08 ` Chia-Yu Chang (Nokia)
2025-07-04 8:53 ` [PATCH v12 net-next 10/15] tcp: sack option handling improvements chia-yu.chang
2025-07-04 8:53 ` [PATCH v12 net-next 11/15] tcp: accecn: AccECN option chia-yu.chang
2025-07-14 14:32 ` Paolo Abeni
2025-07-15 14:49 ` Chia-Yu Chang (Nokia)
2025-07-16 8:29 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 12/15] tcp: accecn: AccECN option send control chia-yu.chang
2025-07-14 14:54 ` Paolo Abeni
2025-07-15 15:14 ` Chia-Yu Chang (Nokia)
2025-07-16 8:33 ` Paolo Abeni [this message]
2025-07-14 15:12 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 13/15] tcp: accecn: AccECN option failure handling chia-yu.chang
2025-07-14 15:00 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 14/15] tcp: accecn: AccECN option ceb/cep and ACE field multi-wrap heuristics chia-yu.chang
2025-07-14 15:03 ` Paolo Abeni
2025-07-04 8:53 ` [PATCH v12 net-next 15/15] tcp: accecn: try to fit AccECN option with SACK chia-yu.chang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=514ca303-149a-4f7e-a473-31051fb7162b@redhat.com \
--to=pabeni@redhat.com \
--cc=Jason_Livingood@comcast.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@fiberby.net \
--cc=bpf@vger.kernel.org \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=corbet@lwn.net \
--cc=dave.taht@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mirja.kuehlewind@ericsson.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=rs.ietf@gmx.at \
--cc=shuah@kernel.org \
--cc=stephen@networkplumber.org \
--cc=vidhi_goel@apple.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).