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.133.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 1077637D12F for ; Mon, 2 Feb 2026 17:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770052800; cv=none; b=atGpCjZs0k8s5zgY5H+ByQ89v5QJz9WBkxgAjWO3WBiF3NCOQoyufxM04ct3PXwX2P2P6jjho/amoebiezqYAXqiAxNepEZV2otQwrK7E5cJt7d+ySzy2LpkA+ne6OBaRF4AW2jd/jw6mMU+cmt8EcFwbYtiSHVXwrSjKLmBxro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770052800; c=relaxed/simple; bh=sg7r2bggyNeKqLAfbEeFBVcgdfvWyCSGQHXTajmTCS0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gtTXKfiZCfpE04nctQpD3ImVt2t9RPR6cWge+4V0KCl4yyBdN2x1kl33K2BT/0ZaEC9TWsRDQ1BbgZ4iJ0A0zM4FARhF1tCZAus9Pg8Yp8B/ykJYes2KVjt4LmJtC7BTMn2tW3jz3HsEj3QiZDiLAimbuyO9qjd0GSp8r7I9OB4= 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=Ru8wny+a; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=ALHckiru; arc=none smtp.client-ip=170.10.133.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="Ru8wny+a"; 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=1770052797; 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=Ru8wny+avuOYn/24ln9rRybEEL+TosE9X/sn0ESESfwb5q5ba8MplUOHhW0VN60AZc9wjV NHHo0Apn4MyWnbLAYPWAltdwFe8LB+ryhLaqhMcGYsW/+JQqJd2sYxz56YZ6BFRmAsGeds X2J1U2IfjGVT7FGF/tN1sDl9c663cGY= 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-330-I3T75DWpPBGvtxbdEdsIYg-1; Mon, 02 Feb 2026 12:19:55 -0500 X-MC-Unique: I3T75DWpPBGvtxbdEdsIYg-1 X-Mimecast-MFC-AGG-ID: I3T75DWpPBGvtxbdEdsIYg_1770052794 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-432db1a9589so3221914f8f.0 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=VrYIHdgONG1QWit+6GxjMzQ0O7ZWUSn/h3NdWAoxk0H0FOZ3XR0Le1UWRX5Fh2MnLF onu962QXf/vyKUc774bFxWZrsmxN40zBlQNYhkT5CO2m/f41iTbFYwZ1ItdDWYXpD7m1 Pz33rjg2prwn5FSAjmDgY7MH39CJagHqXhdH+1PaG1WpmGkVMcOvZB8sLNWcqS7g+35Y +AtRWxFTZGppn3gKy9fRaYW+eSOCcqUqbRTJFqdIJxncFfBPN7p+kOizK1e+cwcGmCiI S1iwuewCn4oNnSzyF9o4Z5U/qVssvEycFTPcHhdm5kIdi0tjX0yib2nnocGI+dCdUFtr kikA== X-Forwarded-Encrypted: i=1; AJvYcCUgLy/438ow1ONdjeVghw8z8Lb7dRY9M2cJbwywXfrobMCdpMaap4sZZOKTIV4tem8WBRTHlsM=@vger.kernel.org X-Gm-Message-State: AOJu0YzUtgJfXuxigHui+JMu8ny5PdCMqzz/LRv5ml/lHPFjXvnsCYks JW267J8906h4D/4IeRlnEmGIR4BgQwbg0KLIPG6Sp/AO4zhVOU2h34bU+uQM9EHHINyLWCGqSdM Z19DlCUknGdbwo24Mid0r/kbabNRYAm8H6eIozwOrpH8oCsNddbfSNdN5ZQ== X-Gm-Gg: AZuq6aKJjhim6xQ2PC4Jk/zx1xAg8dcKtI/TFwnQxhgE3NxxlGH/LhD8BPCi9CVbr8q uy00854tLmM6YOD+hEvacD0EDZMm+yc8L7sbBh/93sqndiqWgmmVRHVZQMOXymflV7xGPVvYVnL 1PPJgkivIKjBlZAaqjteMYLFKH6PBht+pGsv86Ay1eojHGdoWhseXBQJmeDbxrQ5D7Tao4FDn3e 1gv52G1J/4DV3aQtet5c9czPR9+zJOiQb25ADu2lEOpiJmozQmG0glTcYVMDBgIcoM1RgxQgCZM f6KzF2lioRdsnG+rWFDU3ybMYrPq0X0BPX9soJ6APyzojXok/BmgO0Mqb0bTsr4P2T8LrGJi5M4 tj2N/tw== X-Received: by 2002:a05:600c:c4a5:b0:47e:e946:3a59 with SMTP id 5b1f17b1804b1-482db4992d3mr133149875e9.34.1770052794258; 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: netdev@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