From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.176 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796146565; b=SKiPP/MwaRfQsQgr6mtWUQYhxI1sNlGCwv0ATbtfedBzHGv5oaIiFqiNFSuPOGXqvlRf jO65nTFfrPEf8iHIKvGtbsI46eG5Jm97LjZEZVohCtNz3L+Ipt6KRZSu/KY4kZnEsj1yh r5DAGt2uGGZYoYNuYewKm1QJZqVixWcAxtVzvEIPTpbGg/Zh7+MRZHYDA9AF3AiFhf6X0 HJGH3apCkvfs52+D5X0eVaQYzgm2mV8x7tJdr9OBekca/3RCHTF7iHncyJt/drpEfWpXN TZZ73MoVjqDhZtexZDeXw0GRMqbwiz6h6lMKrTWJJt3Xy0U78hPf2/VnDb9R1u4z3ug== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796146565; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Date:From:To:Cc: Subject:Message-ID:Mail-Followup-To:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=H8KZzNMqcJjupKJsPfPMnc4YVjp3tJhmz2pDEpX6b+0=; b=ddiMH0whlsO2orUnh5e5BnmJfNSRpyEeoWLQZlM81oc/bctOvHv2GEmFc0DjeX/xx4YE zgdm8gG585kMD5dR0lwbfpgtddZmvxUg4OXr3t9PoLtIbMYc/NgrGg4F2woQ/BIyTbfo8 d/UyfXPkJ62xogGQ5d/uiCsVPgMqdOa7VBOpkpP+5ZLEJuLjyRqqHFkSBPwaqBIe2Ht1g uspz50hT/wmBs8yisHU+ZRNrchW3F5Qw3zHoRlxfeh4YyxqTErx2K5Hst6NePo6Ra2aiU PdH0EiWOkFgg/iQOaPxhNDTypOQn5Hku/YqdZLVr7PUXzDM3y1CWhLdP8nDqo7xFDCQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=dama.to; spf=none smtp.mailfrom=dama.to; dkim=pass header.d=dama-to.20260707.gappssmtp.com header.i=@dama-to.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Fq7QhIkd; arc=none smtp.remote-ip=209.85.210.176 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92980606A68A for ; Tue, 1 Dec 2026 17:36:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 92980606A68A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=dama.to Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=dama-to.20260707.gappssmtp.com header.i=@dama-to.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Fq7QhIkd Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8ca6a12efd9so4730283b3a.1 for ; Tue, 01 Dec 2026 09:36:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dama-to.20260707.gappssmtp.com; s=20260707; t=1796146564; x=1796751364; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=H8KZzNMqcJjupKJsPfPMnc4YVjp3tJhmz2pDEpX6b+0=; b=Fq7QhIkdWXRwtxoOju4yy+ZTxugplg/ppGbHlpra+3k9vxZ4OurG/Nm5TIBS8MN9zn axXE817gQ7z6arMaC6jUykPyhYQn+5p9iPrnTykwoA/UZhtmtgYCw8EMenqgkkDAm0Aj P2H1qxDO03sVr+gOpXSBQHWJABs06L+SRnp+9mBtyr4kFjUxJmujqrCipoOGTPJvE1E/ 2iG5L7xfUjchXaTItyRaA+oFIfgz+DnH0UHrjUwZ3jVIn0euU3PrmVSGOGAAziDOGQfl kwiXK5FW8KVj/HuXsQo1yD9n2RNRcU2i3V+uldBLgNI3v9DObrHxW7tnh3Via9J1c78J ko2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796146564; x=1796751364; h=in-reply-to:content-disposition:content-type:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=H8KZzNMqcJjupKJsPfPMnc4YVjp3tJhmz2pDEpX6b+0=; b=1I2AwLzNPP3WDnXVQIQygRHwZ3H1Ds/MAGAXxmfkT3CCBZ2aKMCRSfsgKNh7lSt+x2 kOanNeS8+oonxawWMVRIMqOVrfyBWzxgIgwn973XNOkvvYugqkvUgyPt6UpvHYjFTMPL g96EXwbot3QoEX9ki25Obz1FmLTLAXHKgvUJOvwKXkMPYRq9ak67OiQNmdw1U2q5jnCj jA9XXmpnQhVLo2KWekgIFZIuhEF/YQiLV03yXKHGkAS0BpGTzZ4uBb0GaH9aA3TUpzJV YTAl4DY5XHhomSrAbwgcobw9zFMrGsDQSWBghPSeKFw6vXdpgAPuUGyBNOG7WbGsDezH An2w== X-Gm-Message-State: APuU4Z+0NW/bc7ZMp9grFWVCDkLp4g70+olTqN9gm+w+2fDWsFbXu7Xg Q4bVmYgqZOoO7pw8wrXSb/veTzrkZp9bYVQO7SdsDmYS7fZFQfv05Ow7BcUMEgnni1Y= X-Gm-Gg: AZFdTZfLLbRmQsgPGpFhVmTCJxW1hcZkUAyMJPSNB7bFYym3SyzT65K7Nr3enfqqYyh J4esgKvpgffT6d7gyWqMAlB1Dd1qqlbQJNsg1mD8YyLS8qh7PkzMi8pjFPbtWy7r8R6q13HI+Tq F4niKLRi25AeNCodcx6CIWZ/jXssAexkAFyqKgL0Sjp5uNvzlKk9CA9bYgRfIHtm4syjejVKSUv a9y3M550eBDSE7hk1TudMdqB2WSdNjKNlDzgWSi+oD49XOD4BRNJT8GnGQto+mpJ9LL+d9pErST Aj0PfioY4kP7xIvZWucMV8r7s18ZJUfTrxs3D9zsU4hJCdUDuAvzId/SvbujI3g042LMT0DyJgG 3NmNzGKw84FivSb99CZnAcO3ohYkQKIQ7UVBXAVIyOCNfx8MwV19CHt2r4mZ2ZN6JmcuZZQ4tqb RRVVWiHWpuG8/jBFlt/OGC6g6DP/OaYnJcJqB83HLUiiKy6ofYX0pN0qtoEEq+KIEakxvK2oXh3 uQ2fic1dagQH3X2tffxv2lM75EI3QB2qpY7hCoiSa0ENVf9gmOCuwrUk/5mtTZB/QrmF6pVR9pY hLe0Kzcqu+jfXu58yEpwheVMOjP83FKvKmZMbhMMaw== X-Received: by 2002:a05:6a21:a92:b0:3dd:a196:30a1 with SMTP id adf61e73a8af0-4014e255570mr37161086637.81.1796146563590; Tue, 01 Dec 2026 09:36:03 -0800 (PST) Received: from localhost ([2a03:2880:2ff:43::]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cdebb45c972sm11780854a12.20.2026.12.01.09.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 09:36:03 -0800 (PST) Date: Tue, 1 Dec 2026 09:36:02 -0800 From: Joe Damato To: Hamza Mahfooz Cc: netdev@vger.kernel.org, Haiyang Zhang , Wei Liu , Dexuan Cui , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wei Hu , Konstantin Taranov , Willem de Bruijn , Simon Horman , linux-hyperv@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH net-next] net: mana: add UDP segmentation offload support Message-ID: Mail-Followup-To: Joe Damato , Hamza Mahfooz , netdev@vger.kernel.org, Haiyang Zhang , Wei Liu , Dexuan Cui , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wei Hu , Konstantin Taranov , Willem de Bruijn , Simon Horman , linux-hyperv@vger.kernel.org, linux-rdma@vger.kernel.org References: <20261130231409.2567518-1-hamzamahfooz@linux.microsoft.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130231409.2567518-1-hamzamahfooz@linux.microsoft.com> On Mon, Nov 30, 2026 at 06:14:09PM -0500, Hamza Mahfooz wrote: > The hardware segments both TCP and UDP. In LSO mode it takes the L4 > protocol from the parsed header, rewrites the IP total/payload length, > the IPv4 ID and the UDP length of each segment, and computes the L4 > checksum from scratch. However, it reports a non-fatal error if neither > the TCP nor the UDP checksum offload bit is set in the TX OOB. > > Advertise NETIF_F_GSO_UDP_L4 and, for SKB_GSO_UDP_L4 skbs, set > comp_udp_csum instead of comp_tcp_csum and seed the UDP checksum > rather than the TCP one. Everything else, including the header size > calculation in mana_get_gso_hs(), is shared with TSO. > > Advertise this change to the PF with the new driver capability flag > GDMA_DRV_CAP_FLAG_1_UDP_SEGMENTATION_OFFLOAD. > > Tested between two Azure Standard_E372is_v7 VMs on different hosts, > where the MANA device is the VM's only network interface. The changes > below are relative to the same kernel with tx-udp-segmentation turned > off. > > udpgso_bench_tx, one sender pinned to a CPU, 61600 byte sends split > into 1400 byte segments, median of three 10 second runs: > > throughput CPU per byte > IPv4 +307% -84% > IPv6 +348% -84% > IPv4 zerocopy +498% -80% > IPv6 zerocopy +190% -79% > > CPU is the user plus system time of the sending process. With USO a > single sender is no longer CPU bound. Its throughput varied widely, > both within and between runs, but its CPU time per byte did not. > > With 8 IPv4 senders, each on its own core, the total throughput went > up by 432% while the senders' CPU usage went down by 51%. With the > default 212992 byte send buffer, a socket can only have about three > such sends in flight, so the rate also depends on TX completion > latency. With net.core.wmem_default raised to 4 MiB, 8, 16 and 32 > senders all came close to the VMs' network limit, with 604% to 656% > more throughput than software GSO. > > Uploads with msquic's secnetperf (which uses UDP_SEGMENT): > > throughput CPU per byte > 1 connection +39% -48% > 8 connections +104% -56% > > IPv6 results were similar. Sending without GSO is unaffected. > > NOTE: netvsc does not advertise NETIF_F_GSO_UDP_L4. On VMs with > accelerated networking, where traffic goes through the netvsc device > and is then passed to the VF, UDP GSO packets are therefore still > segmented in software until netvsc supports USO as well. Where the > MANA device is the VM's network interface, as in the tests above, > this patch is enough. > > Signed-off-by: Hamza Mahfooz > --- > drivers/net/ethernet/microsoft/mana/mana_en.c | 26 ++++++++++++------- > include/net/mana/gdma.h | 6 ++++- > 2 files changed, 22 insertions(+), 10 deletions(-) > Did you run uso.py from the selftests? Asking because it wasn't mentioned and it might be worth running if you already have the test environment setup. You might want to run it from the latest net-next because I recently added small MSS size tests. Other than the nit above about running the selftests, I spent a bit of time reading the patch and it looks vaguely right to me with the caveat that I am not super familiar with this driver, but: Reviewed-by: Joe Damato