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 CE7AD3859EC for ; Mon, 2 Feb 2026 17:19:59 +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=1770052801; cv=none; b=su30y9cXsYqYVzGcp2H5p+Fv2CwVLAC6bft8e+jV96bb3b41ADNX+ZI+1FFkfIZ2ofeXcsjr6rPYL24wa7MAwU1WA3OWYixRHTFl+S7rbvXgiwH2M8gDL46fgaynWXYb3Kf8K7k9WsUoFfDAthuzCPShmfZFKr4TXCxGHeA37OQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770052801; c=relaxed/simple; bh=HxokrcUDBIzw4LrI1bf7IsFPbjKVSbqIhYFuWa6zAEQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=HFHRSw3CoBNua5Gz/fQe6ugwfC2CEcBw1AAqMQSNnMDSV/3lJNPni8DSjnIb3RNRKJj4EEb/umBqjPFRmgzEmxyalDvqJJqU+ROyhQx+03Z8flTVSUMT2/TDudvF2ESUExcqE8SmR4BpPny5oWHTNY0O3bE2Fd8r83+gmMuLsSo= 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=UX2D4fQo; 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="UX2D4fQo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770052798; 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=qK9fmq1vPLn9Q2ZXuyz/OjqW7jSwwfNi/Rf4Xya5cvo=; b=UX2D4fQoQl9uhD5P9QCYr1n1pkrjbhlJlgZp0wEcGuFRGajBF5b32OWirSqsBhWnBrqTDX bQX0d75BvMfonTHCenUxGfkLTascbqg/RBtgIwMyYzwXfxCGqt7ZEJqwGod7i1xvA3aULc hdiNPJHVzTv+B8PVW6QsIAZcxL6L9io= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-s4-nS8CuPemm6IMMZdb1Sw-1; Mon, 02 Feb 2026 12:19:55 -0500 X-MC-Unique: s4-nS8CuPemm6IMMZdb1Sw-1 X-Mimecast-MFC-AGG-ID: s4-nS8CuPemm6IMMZdb1Sw_1770052794 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-432db1a9589so3221917f8f.0 for ; Mon, 02 Feb 2026 09:19:55 -0800 (PST) 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=AhnM/9xJAjfaGSSx5cquVT3ghdcQDLHgvwVVNfNbf7WTkwJ+TTPnSITnhpH3sgBQyv 891w4ue1wbL95uF63Brj9RJfnIATo/BX+2bFJKUndHO7WWGyYnsS0UMUG4+yyhWIZXFh BBE051bS9RXfKdyOPa6SASiPHpq0tMmReOGaWU4ZuuMKX6vLQjfPlZXx4gZ6znm5IF4Q dq2XDcQUdmE4va1plPsHEu3oucErUuC72qreI2gLW9VJux9ZPvMVkbwiShOCfJpVx+w7 q6EBKIVQ4uIhYSwSWZaDth39zKM4s8qgRNDlLAw4yCUPaL96LZ3uN74rR9eCsOb9OQQE V6IA== X-Forwarded-Encrypted: i=1; AJvYcCWTSestBEqyul3v+7kMuUnGKIF82tauPQ3PL/9x1aiZJqthB4qnnL1fQG+iKb/JuqNHDYZf1i4YEUxTsHrj0A==@lists.linux.dev X-Gm-Message-State: AOJu0YycNhXtqT4n/l13z5TsOm0DgASooWtT74s4fM/UzFbaEaEXHYQD +WJlm5Qx9YYAOE/LfjTgXe2RmFE/foDURD5WvQu4224VKb9oe8AE3HDl9UfSbyuh0Jp47rJofUI Sc4W75HlgvCulnKpyEBZi+yYRM6bBgI/ge4yWUOq8xc79Zg3xriQRRPD9KUePUSbuCoTY X-Gm-Gg: AZuq6aL+DXMz5yp67gcYwh3u791M1veEzXwB2LxL091gtDboFC1d4JAtnJD0zhlLkEL d8Zegawp76d/Y5iAoWnUe06KE1E9JBcBbb+mxR9op1ZAHdbNgN8OnS7RfzdCCQ/8PO7AYfbT7Dd tMB5J5Dyjx6GPZc7IRqB14AG9DstOA9Ds15oRedCz6olI3nBe+G4Ze4xIbSjgD+oBZVj+naHJ0m zlQ4UUyXNfKlSVPhG7dlO2o3CILosJHWbPFArOkh2PtLGjZR7l2Fp4mn/CbgyevJcaFVGQ5RJlv cDO1XcSkvsNzEt1UcCr5z23ssi0BnM80GY55PEGIa3kHXEjR3PKmO4fED9uM5rL2s/LQeTL4Ofn bvB91zA== X-Received: by 2002:a05:600c:c4a5:b0:47e:e946:3a59 with SMTP id 5b1f17b1804b1-482db4992d3mr133150025e9.34.1770052794288; 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: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lLUTzjrlpyrUjQjZ1JkWenE9X7bbDbqoYFROfZbb2OY_1770052794 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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= .com; Koen De Schepper (Nokia) ; g.wh= ite@cablelabs.com; ingemar.s.johansson@ericsson.com; mirja.kuehlewind@erics= son.com; cheshire@apple.com; rs.ietf@gmx.at; Jason_Livingood@comcast.com; v= idhi_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= .com 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