RE: [PATCH net-next v4 1/4] tcp: export CE count in rate_sample
From: Chia-Yu Chang (Nokia)
Date: Sun Nov 29 2026 - 11:50:45 EST
> -----Original Message-----
> From: Eric Dumazet <edumazet@xxxxxxxxxx>
> Sent: Thursday, November 19, 2026 7:47 PM
> To: Chia-Yu Chang (Nokia) <chia-yu.chang@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; kuba@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; pabeni@xxxxxxxxxx; davem@xxxxxxxxxxxxx; kuniyu@xxxxxxxxxx; ij@xxxxxxxxxx; ncardwell@xxxxxxxxxx; koen0607@xxxxxxxxx; g.white@xxxxxxxxxxxxx; ingemar.s.johansson@xxxxxxxxxxxx; mirja.kuehlewind@xxxxxxxxxxxx; cheshire@xxxxxxxxx; rs.ietf@xxxxxx; Jason_Livingood@xxxxxxxxxxx; vidhi_goel@xxxxxxxxx; Mike_Rudolph@xxxxxxxxxxx; Jeff_Howe@xxxxxxxxxxx; srichard@xxxxxxxxxx; Olivier Tilmans (Nokia) <olivier.tilmans@xxxxxxxxx>
> Subject: Re: [PATCH net-next v4 1/4] tcp: export CE count in rate_sample
>
>
> 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.
>
>
>
> Le jeu. 19 nov. 2026 à 19:01, <chia-yu.chang@xxxxxxxxxxxxxxxxxxx> a écrit :
> >
> > From: Ilpo Järvinen <ij@xxxxxxxxxx>
> >
> > Store the number of newly ACKed/SACKed CE-marked packets in rate_sample.
> > This will be used by upcoming congestion control algorithms, e.g., TCP
> > Prague, that need access to AccECN-derived congestion info.
> >
> > For RFC3168 ECN mode, acked_sacked_ce equals delivered when FLAG_ECE
> > is present. For AccECN mode, it carries the derived CE-marked packets
> > from AccECN options or ACE field based on RFC9768.
> >
> > Signed-off-by: Ilpo Järvinen <ij@xxxxxxxxxx>
> > Co-developed-by: Olivier Tilmans <olivier.tilmans@xxxxxxxxx>
> > Signed-off-by: Olivier Tilmans <olivier.tilmans@xxxxxxxxx>
> > Co-developed-by: Chia-Yu Chang <chia-yu.chang@xxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Chia-Yu Chang <chia-yu.chang@xxxxxxxxxxxxxxxxxxx>
> >
> > --
> > v3:
> > - Improve commit message
> > - Rename ece_delta to acked_sacked_ce
> > - Remove redundant rate_sample initializer
> > ---
> > include/net/tcp.h | 1 +
> > net/ipv4/tcp_input.c | 40 +++++++++++++++++++---------------------
> > 2 files changed, 20 insertions(+), 21 deletions(-)
> >
> > diff --git a/include/net/tcp.h b/include/net/tcp.h index
> > 25d11fab1b03..4b1159e6c125 100644
> > --- a/include/net/tcp.h
> > +++ b/include/net/tcp.h
> > @@ -1353,6 +1353,7 @@ struct rate_sample {
> > long rtt_us; /* RTT of last (S)ACKed packet (or -1) */
> > int losses; /* number of packets marked lost upon ACK */
> > u32 acked_sacked; /* number of packets newly (S)ACKed upon ACK */
> > + u32 acked_sacked_ce; /* number of packets ECE-marked upon ACK */
>
> I presume you meant "CE-marked" instead of "ECE-marked"
Yes, I will clarify in the comment over here by saying this filed is different between AccECN and RFC3168 ECN in the next version.
Thanks.
Chia-Yu