> -----Original Message-----
> From: Michael S. Tsirkin <[email protected]> 
> Sent: Sunday, February 1, 2026 10:18 AM
> To: Chia-Yu Chang (Nokia) <[email protected]>
> Cc: [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]; [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]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]
> Subject: Re: [PATCH v1 net-next 3/3] virtio_net: Accurate ECN flag in 
> virtio_net_hdr
> 
> 
> 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.
> 
> 
> 
> Thanks for the patch! Yet something to improve:
> 
> On Sat, Jan 31, 2026 at 11:55:10PM +0100, [email protected] 
> wrote:
> > From: Chia-Yu Chang <[email protected]>
> >
> > Unlike RFC 3168 ECN, accurate ECN uses the CWR flag as part of the ACE 
> > field to count new packets with CE mark; however, it will be corrupted 
> > by the RFC 3168 ECN-aware TSO. Therefore, fallback shall be applied by 
> > seting NETIF_F_GSO_ACCECN to ensure that the CWR flag should not be 
> > changed within a super-skb.
> >
> > To apply the aforementieond new AccECN GSO for virtio, new featue bits 
> > for host and guest are added for feature negotiation between driver 
> > and device. And the translation of Accurate ECN GSO flag between 
> > virtio_net_hdr and skb header for NETIF_F_GSO_ACCECN is also added to 
> > avoid CWR flag corruption due to RFC3168 ECN TSO.
> >
> > Signed-off-by: Chia-Yu Chang <[email protected]>
> 
> 
> To the best of my understanding, this is a new feature - support for 
> VIRTIO_NET_F_HOST_ACCECN, VIRTIO_NET_F_GUEST_ACCECN?
> The commit log makes it sound like it fixes some behaviour for existing 
> hardware, but that is not the case.
> 

Thansk for the feedback, I will update commit message in v3.
> 
> > ---
> > v2:
> > - Replace VIRTIO_NET_HDR_GSO_ECN with VIRTIO_NET_HDR_GSO_ECN_FLAGS
> 
> but where is v2? this is v1...

I shall update this version as v2, will do at the next version.

[...]
> > diff --git a/include/uapi/linux/virtio_net.h 
> > b/include/uapi/linux/virtio_net.h index 1db45b01532b..af5bfe45aa1f 
> > 100644
> > --- a/include/uapi/linux/virtio_net.h
> > +++ b/include/uapi/linux/virtio_net.h
> > @@ -56,6 +56,8 @@
> >  #define VIRTIO_NET_F_MQ      22      /* Device supports Receive Flow
> >                                        * Steering */
> >  #define VIRTIO_NET_F_CTRL_MAC_ADDR 23        /* Set MAC address */
> > +#define VIRTIO_NET_F_HOST_ACCECN 25  /* Host can handle GSO of AccECN 
> > +*/ #define VIRTIO_NET_F_GUEST_ACCECN 26 /* Guest can handle GSO of 
> > +AccECN */
> >  #define VIRTIO_NET_F_DEVICE_STATS 50 /* Device can provide 
> > device-level statistics. */  #define VIRTIO_NET_F_VQ_NOTF_COAL 52 /* Device 
> > supports virtqueue notification coalescing */
> >  #define VIRTIO_NET_F_NOTF_COAL       53      /* Device supports 
> > notifications coalescing */
> > @@ -165,6 +167,9 @@ struct virtio_net_hdr_v1 {  #define 
> > VIRTIO_NET_HDR_GSO_UDP_TUNNEL (VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 | \
> >                                      VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV6)
> >  #define VIRTIO_NET_HDR_GSO_ECN               0x80    /* TCP has ECN set */
> > +#define VIRTIO_NET_HDR_GSO_ACCECN    0x10    /* TCP AccECN segmentation */
> > +#define VIRTIO_NET_HDR_GSO_ECN_FLAGS (VIRTIO_NET_HDR_GSO_ECN | \
> > +                                      VIRTIO_NET_HDR_GSO_ACCECN)
> >       __u8 gso_type;
> >       __virtio16 hdr_len;     /* Ethernet + IP + tcp/udp hdrs */
> >       __virtio16 gso_size;    /* Bytes to append to hdr_len per frame */
> 
> 
> UAPI changes need to be added to the virtio spec.
> Pls get this approved by the virtio TC.
> Thanks!

There were some discussions last October in [email protected] 
mailing list.

At that moment, it is suggested to make Linux kernel accept new comments for 
SKB_GSO_TCP_ECN and SKB_GSO_TCP_ACCECN first.

So, could virtio-spec colleague give your feedback? (Parav?).

Otherwise, the CWR handling of virtio will be wrong after all Accurate ECN 
commits are merged in Linux.

Chia-Yu

Reply via email to