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