From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD4DC37F8A9 for ; Mon, 2 Feb 2026 17:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770052799; cv=none; b=fyHqNLd4gYc7hE4fxBydjA4w5aAiYu0pL8ldOWCD8WyATZvOoOmoFGjigPqfBJSpRtYh5S37LDutFcN6VbdHVqG/h/xq+FtmHALNMI/GtLcq9CfYlTcHCXwCNWwUxPOcZ5w2IOhc7omsaFPctg/U5zAckgnyq0NjJAVV3pMX1Es= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770052799; c=relaxed/simple; bh=sg7r2bggyNeKqLAfbEeFBVcgdfvWyCSGQHXTajmTCS0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gR58nFeZ0IghNFWv9JGNMMoFSAKHkguIy2yPVyf7d1B1f8znh7Zf+8htYZUwFMUxjA+7C46zSaOvN+8Gkh5g9KAk5C3NggnTkPaOc4UHoOyxzCUSNtx5zd6dDy/s5vTmTnx8OX9u4nUC1BHSPjNPKzySwM627R21Tp0EH2gcp5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YrX2abF+; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=ALHckiru; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YrX2abF+"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="ALHckiru" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770052796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ueRmNBsULHX80WZv6MW3ddncHXPCqgI+9LkeT0jMc9E=; b=YrX2abF+mmP9/MVEHtCdyfT6eVT4SK5GfJvmb6XP6MdnwPUolzhJstYDOU+cn+83oeUG4X OVSUqKt5X00zKi9xFnxldbepM0HFlE1bEurh+X1IIO39KT/oJHZkajRN2WcOd1mmXjN+UV CDpFVdASihB/GDWntrRb0E0Rn1i+IbQ= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-7B_-GuyNOP-IOHrlRzwMXg-1; Mon, 02 Feb 2026 12:19:55 -0500 X-MC-Unique: 7B_-GuyNOP-IOHrlRzwMXg-1 X-Mimecast-MFC-AGG-ID: 7B_-GuyNOP-IOHrlRzwMXg_1770052794 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-430fe16b481so3089471f8f.3 for ; Mon, 02 Feb 2026 09:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1770052794; x=1770657594; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ueRmNBsULHX80WZv6MW3ddncHXPCqgI+9LkeT0jMc9E=; b=ALHckiruESfNzZ7hHsXUXRLtVe7//5gK/OLLXESaB9pB5FBdAZdGPXf2bqNy7dC7g1 eRb0O1xS0E2jYlIjbYSkN+Qne0asRv6XoXyNTGzDkYDwV4b016xgvpGmJSOhOaYQKvAm M3XMRwQHDSH2aA5qzVtNOQ/AKEVF5zfTdS2drgB3FA7fefqI1B5xAXvsMQjpYYGV6f+P kzT0Wqgb4kRjHiaY+HzgdcSeHCH9vvZzYAe/Fw8JltI19I/2bvPBN2UfMH5AIcJYV3CK xfOf/smPA0Ke/MVI9+1gd47Xcu5naSCSPygRNptpbZ0AEHVY6PhYzfZ/kHYMdaQH5CLd xLSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770052794; x=1770657594; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ueRmNBsULHX80WZv6MW3ddncHXPCqgI+9LkeT0jMc9E=; b=XRN4dn20u5bIZOzleOKQQd0MsAfUOWnzXLP5MEG1/WVsZ8zSPhN5HlAjG7EOw8PxC3 0BAkP7YBKjjb9nbtiZqCaBjLR/PwV1Qtn5JDTful6xWKZZbGQTTUO2Y9C0xLpIpQrzN7 JYtpRG16Udon4OuVkKD1XcOMnEZj4sM3dI24wesqFa9RyPcg7tYpUSivAqQPrwseZ8a4 Oy/XmaDNs+cAnOVJBRldeos/YRdZ88lJEzEkrBKXOgBeNwj6PGYd1g7GdaErnq+dN99d 8wUzE0aSWjVB0IzXuu6a1IF2q33qEsegfu5vOmCuSQfxdB7N99V9hqG4HRNv+omSIhPv 1DRg== X-Forwarded-Encrypted: i=1; AJvYcCVKr4yS3EfOB3UT5PvTG+LaM8fdIOZoLAIlGUCr4bH8hOlHU8tT2UPDb0zPN85K8t50UCmAgTxY33I=@vger.kernel.org X-Gm-Message-State: AOJu0Yy7KFIleEu84bXYNzabykflUOQ6othYTHzCCbPtLoElVJHAT2Eg skOW2tEy3vz2lwZgiK+O6JV8E1GVnAE6/r5lPxpHOy+aC3szrKvFQJv5rGGr4vUW+E9wLjVEBjG X4apmh7W/zmjTiggDqJ/0B4aFaF09zsEKoXDe211vmMj54+aGSmxb9PepYg+oLQ== X-Gm-Gg: AZuq6aLIuATl5/YbkASaO1MOLv1tcWm3JR08sSsIdFrVGTUyzpxygEzmv2sC2rsUq0h qu5nAPpUQZuTZLUF5XIu4WUbP4nUbyGCFIol16vafWkC8bjZvg0SXyY5dwukgj3wXbR/Uf18jRK ddsRmPA8NazkesBT16qW+K9DG55J7pSeWvxElQY+oLVahGuE7t+rD1zs20MTbkknEaW8MtDogQd loLxwTaWDCb+f4NRML1m2KnPYGOlk+D8/zkpKzQve+wGTIXSumx24BI497N5EoxHhczD40oP0pG EqproP4bdfVKsepVSQD0ag9mjKV0cVSoHDbfzptsYzhR904DaUV0ZAUWxPSSFawAWA9Tzh87P9c BF2Fc/A== X-Received: by 2002:a05:600c:c4a5:b0:47e:e946:3a59 with SMTP id 5b1f17b1804b1-482db4992d3mr133149905e9.34.1770052794264; Mon, 02 Feb 2026 09:19:54 -0800 (PST) X-Received: by 2002:a05:600c:c4a5:b0:47e:e946:3a59 with SMTP id 5b1f17b1804b1-482db4992d3mr133149375e9.34.1770052793718; Mon, 02 Feb 2026 09:19:53 -0800 (PST) Received: from redhat.com ([2a06:c701:73e3:8f00:866c:5eeb:fc46:7674]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48305129419sm2637285e9.6.2026.02.02.09.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 09:19:53 -0800 (PST) Date: Mon, 2 Feb 2026 12:19:48 -0500 From: "Michael S. Tsirkin" To: "Chia-Yu Chang (Nokia)" Cc: "tariqt@nvidia.com" , "linux-rdma@vger.kernel.org" , "shaojijie@huawei.com" , "shenjian15@huawei.com" , "salil.mehta@huawei.com" , "mbloch@nvidia.com" , "saeedm@nvidia.com" , "leon@kernel.org" , "eperezma@redhat.com" , "brett.creeley@amd.com" , "jasowang@redhat.com" , "virtualization@lists.linux.dev" , "xuanzhuo@linux.alibaba.com" , "pabeni@redhat.com" , "edumazet@google.com" , "parav@nvidia.com" , "linux-doc@vger.kernel.org" , "corbet@lwn.net" , "horms@kernel.org" , "dsahern@kernel.org" , "kuniyu@google.com" , "bpf@vger.kernel.org" , "netdev@vger.kernel.org" , "dave.taht@gmail.com" , "jhs@mojatatu.com" , "kuba@kernel.org" , "stephen@networkplumber.org" , "xiyou.wangcong@gmail.com" , "jiri@resnulli.us" , "davem@davemloft.net" , "andrew+netdev@lunn.ch" , "donald.hunter@gmail.com" , "ast@fiberby.net" , "liuhangbin@gmail.com" , "shuah@kernel.org" , "linux-kselftest@vger.kernel.org" , "ij@kernel.org" , "ncardwell@google.com" , "Koen De Schepper (Nokia)" , "g.white@cablelabs.com" , "ingemar.s.johansson@ericsson.com" , "mirja.kuehlewind@ericsson.com" , "cheshire@apple.com" , "rs.ietf@gmx.at" , "Jason_Livingood@comcast.com" , "vidhi_goel@apple.com" Subject: Re: [PATCH v1 net-next 3/3] virtio_net: Accurate ECN flag in virtio_net_hdr Message-ID: <20260202121830-mutt-send-email-mst@kernel.org> References: <20260131225510.2946-1-chia-yu.chang@nokia-bell-labs.com> <20260131225510.2946-4-chia-yu.chang@nokia-bell-labs.com> <20260201035912-mutt-send-email-mst@kernel.org> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: On Mon, Feb 02, 2026 at 04:56:38PM +0000, Chia-Yu Chang (Nokia) wrote: > > -----Original Message----- > > From: Michael S. Tsirkin =20 > > Sent: Sunday, February 1, 2026 10:18 AM > > To: Chia-Yu Chang (Nokia) > > Cc: tariqt@nvidia.com; linux-rdma@vger.kernel.org; shaojijie@huawei.com= ; shenjian15@huawei.com; salil.mehta@huawei.com; mbloch@nvidia.com; saeedm@= nvidia.com; leon@kernel.org; eperezma@redhat.com; brett.creeley@amd.com; ja= sowang@redhat.com; virtualization@lists.linux.dev; xuanzhuo@linux.alibaba.c= om; pabeni@redhat.com; edumazet@google.com; parav@nvidia.com; linux-doc@vge= r.kernel.org; corbet@lwn.net; horms@kernel.org; dsahern@kernel.org; kuniyu@= google.com; bpf@vger.kernel.org; netdev@vger.kernel.org; dave.taht@gmail.co= m; jhs@mojatatu.com; kuba@kernel.org; stephen@networkplumber.org; xiyou.wan= gcong@gmail.com; jiri@resnulli.us; davem@davemloft.net; andrew+netdev@lunn.= ch; donald.hunter@gmail.com; ast@fiberby.net; liuhangbin@gmail.com; shuah@k= ernel.org; linux-kselftest@vger.kernel.org; ij@kernel.org; ncardwell@google= =2Ecom; Koen De Schepper (Nokia) ; g.= white@cablelabs.com; ingemar.s.johansson@ericsson.com; mirja.kuehlewind@eri= csson.com; cheshire@apple.com; rs.ietf@gmx.at; Jason_Livingood@comcast.com;= vidhi_goel@apple.com > > Subject: Re: [PATCH v1 net-next 3/3] virtio_net: Accurate ECN flag in v= irtio_net_hdr > >=20 > >=20 > > CAUTION: This is an external email. Please be very careful when clickin= g links or opening attachments. See the URL nok.it/ext for additional infor= mation. > >=20 > >=20 > >=20 > > Thanks for the patch! Yet something to improve: > >=20 > > On Sat, Jan 31, 2026 at 11:55:10PM +0100, chia-yu.chang@nokia-bell-labs= =2Ecom wrote: > > > From: Chia-Yu Chang > > > > > > Unlike RFC 3168 ECN, accurate ECN uses the CWR flag as part of the AC= E=20 > > > field to count new packets with CE mark; however, it will be corrupte= d=20 > > > by the RFC 3168 ECN-aware TSO. Therefore, fallback shall be applied b= y=20 > > > seting NETIF_F_GSO_ACCECN to ensure that the CWR flag should not be= =20 > > > changed within a super-skb. > > > > > > To apply the aforementieond new AccECN GSO for virtio, new featue bit= s=20 > > > for host and guest are added for feature negotiation between driver= =20 > > > and device. And the translation of Accurate ECN GSO flag between=20 > > > virtio_net_hdr and skb header for NETIF_F_GSO_ACCECN is also added to= =20 > > > avoid CWR flag corruption due to RFC3168 ECN TSO. > > > > > > Signed-off-by: Chia-Yu Chang > >=20 > >=20 > > To the best of my understanding, this is a new feature - support for VI= RTIO_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. > >=20 >=20 > Thansk for the feedback, I will update commit message in v3. > >=20 > > > --- > > > v2: > > > - Replace VIRTIO_NET_HDR_GSO_ECN with VIRTIO_NET_HDR_GSO_ECN_FLAGS > >=20 > > but where is v2? this is v1... >=20 > I shall update this version as v2, will do at the next version. >=20 > [...] > > > diff --git a/include/uapi/linux/virtio_net.h=20 > > > b/include/uapi/linux/virtio_net.h index 1db45b01532b..af5bfe45aa1f=20 > > > 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 AccEC= N=20 > > > +*/ #define VIRTIO_NET_F_GUEST_ACCECN 26 /* Guest can handle GSO of= =20 > > > +AccECN */ > > > #define VIRTIO_NET_F_DEVICE_STATS 50 /* Device can provide=20 > > > 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 noti= fications coalescing */ > > > @@ -165,6 +167,9 @@ struct virtio_net_hdr_v1 { #define=20 > > > VIRTIO_NET_HDR_GSO_UDP_TUNNEL (VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4 | \ > > > VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IP= V6) > > > #define VIRTIO_NET_HDR_GSO_ECN 0x80 /* TCP has ECN = set */ > > > +#define VIRTIO_NET_HDR_GSO_ACCECN 0x10 /* TCP AccECN segmentat= ion */ > > > +#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= */ > >=20 > >=20 > > UAPI changes need to be added to the virtio spec. > > Pls get this approved by the virtio TC. > > Thanks! >=20 > There were some discussions last October in virtio-comment@lists.linux.de= v mailing list. That's it I could not find it. Could you include the archive link pls?=20 > 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?). >=20 > Otherwise, the CWR handling of virtio will be wrong after all Accurate EC= N commits are merged in Linux. >=20 > Chia-Yu if there's a general agreement we don't need to block linux on tc approval. --=20 MST