> -----Original Message-----
> From: Paolo Abeni <[email protected]> 
> Sent: Thursday, November 6, 2025 12:26 PM
> To: Chia-Yu Chang (Nokia) <[email protected]>; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; Koen De Schepper (Nokia) 
> <[email protected]>; [email protected]; 
> [email protected]; [email protected]; cheshire 
> <[email protected]>; [email protected]; [email protected]; Vidhi Goel 
> <[email protected]>
> Subject: Re: [PATCH v5 net-next 03/14] net: update commnets for 
> SKB_GSO_TCP_ECN and SKB_GSO_TCP_ACCECN
> 
> 
> 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 11/6/25 12:06 PM, Paolo Abeni wrote:
> > On 10/30/25 3:34 PM, [email protected] wrote:
> >> From: Chia-Yu Chang <[email protected]>
> >>
> >> No functional changes.
> >>
> >> Co-developed-by: Ilpo Järvinen <[email protected]>
> >> Signed-off-by: Ilpo Järvinen <[email protected]>
> >> Signed-off-by: Chia-Yu Chang <[email protected]>
> >> ---
> >>  include/linux/skbuff.h | 13 ++++++++++++-
> >>  1 file changed, 12 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 
> >> a7cc3d1f4fd1..74d6a209e203 100644
> >> --- a/include/linux/skbuff.h
> >> +++ b/include/linux/skbuff.h
> >> @@ -671,7 +671,12 @@ enum {
> >>      /* This indicates the skb is from an untrusted source. */
> >>      SKB_GSO_DODGY = 1 << 1,
> >>
> >> -    /* This indicates the tcp segment has CWR set. */
> >> +    /* For Tx, this indicates the first TCP segment has CWR set, and any
> >> +     * subsequent segment in the same skb has CWR cleared. This cannot be
> >> +     * used on Rx, because the connection to which the segment belongs is
> >> +     * not tracked to use RFC3168 or Accurate ECN, and using RFC3168 ECN
> >> +     * offload may corrupt AccECN signal of AccECN segments.
> >> +     */
> >
> > The intended difference between RX and TX sounds bad to me; I think it 
> > conflicts with the basic GRO design goal of making aggregated and 
> > re-segmented traffic indistinguishable from the original stream. Also 
> > what about forwarded packet?
> 
> Uhm... I missed completely the point that SKB_GSO_TCP_ECN is TX path only, 
> i.e. GRO never produces aggregated SKB_GSO_TCP_ECN packets. Except virtio_net 
> uses it in the RX path ( virtio_net_hdr_to_skb ). Please clarify the 
> statement accordingly.
> 
> /P
Hi Paolo,

Yes, SKB_GSO_ECN was set in RX path from patch 
bf296b125b21b8d558ceb6ec30bb4eba2730cd6b in tcp_gro_complete().
In patch 4e4f7cefb130af6aba6a393b2d13930b49390df9 (part of our first AccECN 
preparation patch series), it was changed into ACCECN to avoid corrupting CWR 
flag elsewhere.

And you are right that SKB_GSO_ECN is still been used for virtio and some 
drivers (drivers/net/ethernet/mellanox/mlx5/core/en_rx.c, 
./drivers/net/ethernet/hisilicon/hns3/hns3_enet.c).
Therefore, we plan to replace SKB_GSO_ECN with SKB_GSO_ACCECN in the two 
upcoming patches following this patch series.
Following discussions with virtio-spec colleague (Parav Pandit in cc), it is 
suggested to fix this text first here before changing virtio-spec.

To clarify it, I would propose the following texts in next version for 
SKB_GSO_TCP_ECN and SKB_GSO_TCP_ACCECN:

/* For Tx, this indicates the first TCP segment has CWR set, and any
 * subsequent segment in the same skb has CWR cleared. This is not
 * used on Rx except for virtio_net. However, because the connection
 * to which the segment belongs is not tracked to use RFC3168 or
 * Accurate ECN, and using RFC3168 ECN offload may corrupt AccECN
 * signal of AccECN segments. Therefore, this cannot be used on Rx.
 */


/* For TX, this indicates the TCP segment uses the CWR flag as part of
 * AccECN signal, and the CWR flag is not modified in the skb. This is
 * not used on Rx except for virtio_net. For RX, any CWR flagged segment
 * must use SKB_GSO_TCP_ACCECN to ensure the CWR flag is not cleared by
 * any RFC3168 ECN offload, and thus keeping AccECN signal of TCP segments.
 */


Chia-Yu

Reply via email to