From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796146565; b=iksvyPU6zBoYM/u+9xXbPlpKkn8agdEeokVH24GYk1Kgq88deXjLGqgVbXOfYEiHIdz5 Zy68Ck5GBM97KylhrHGBONK7V8cs+cJIVRxwoqOYU89Ujt2EiGObl7p99eM/m84qkswUk kVP42vRwvV00Zx2VQaQgX2J0aqhDP2/jsMmGn25pTnZg/L0QWqDcrzdjy5PZglwuo7JoQ bYd5/uH1s8ol8Axyc3qDLl6K8TnjWlp7CWYbtupYmugKnIgMw8LiMpD7KnIdhtlAXxWRR 68F689x0s57XBQNgq5K99U1OiSXysRc/RIX5aXbBFssEjow0gbAzl1gBZX/9l3WcN1A== 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-Forwarded-Encrypted: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=O6dzaYp0Pus1IcCXGXxdaWKQq43qJxoqnIBjf3Prqv0LCYlndf9BjAmVWbWk82DWYK2L YpuPHyXTYw+uPaUqqU5JEOjBXSqyb6V62BCHAs5KTju5fPRE3Os8QnEPMevnBL9nK/eA1 BuzaG1HDJ8B7Mqql27JAYLiGkDNlk2uVBq4sjYmODP0X8cs5AelI5rzC064cGDk8OcPFC oRH7Auv6m04X6f0w5R5FZLb6qQzhvAjaruDTcqYBMQctqqjPDmeyIAm7d+rSWdc18dv46 aFZIFSApuD0leOOHzWYqrn3Uv8V+XE7dz2MRQ44VMYiUEd1DX+JPDAfTRMmFdHgdP2Q== 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.174 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 8D115606A31A for ; Tue, 1 Dec 2026 17:36:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8D115606A31A 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) 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-f174.google.com with SMTP id d2e1a72fcca58-8d9a1df134eso705792b3a.2 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=FNZCEJvMuPnGlfVWFXfakzlXwmSoPGg7wJhiCUa7BfsZvh1I+cDf3iWHTlBLIPyavw Z+xILLKu9lWYqVfLEXj+le6bT++dwU7ChX6ToD6h8o426WbKk8FR1iGRLtJmLBhFcvAz MLQf6z9iiqvFJYR6MzDvzM44rkSvF8TrUDrtRpHUizLmzZRQXv0NzpLjHxkXEil7CjQM l0UXFH/KPL3GkVBwYqR4poDtVfLMazSgg2NUaud+m+Ut8iPcSE3ZRM9WnXz+fqVpfeCd jivuRU5dUd+hZBdNJH4qbraYZ747Ie7AchdXaJNFmgT1BMlHoCX76o2AOSpy9xPB1PJW SptQ== X-Forwarded-Encrypted: i=1; AL+hErFPAGvT83ZhLUO7Gb4MF4+dAFgsDXe2s0mrrwEOu0p9iA0yvdkFE/Q3A3wQJpiF9awyWEnSkWrDnj4C@vger.kernel.org X-Gm-Message-State: APuU4Z9Edhf0IwaKCdJja4QcbQ3YZ30qbVjoqLJtjX+Rkpk3AtDaQIf3 Xq91DqPqcdwIVi3SH2/0asCAx0ZLWimAZ15A1iC00ut7/F/Jn4hzhdnl8fXzzRMrj8I= X-Gm-Gg: AZFdTZcjbOU9w4x4lLSYPZEvzd7vULzhGOAIApFYsUYrblxl5gtHAb+oEL/S5pysiLv Nm6TQBVlck2oF2aRRJ6r7FwZgWkVzBAQ1xLsURJD/We92PXsjc70Zkgw/rXcv/z5Y6cCIkRe5dS O0ooGfU7wsA8ABIBXisEDPT8HscXXOX2F/mofp7zrzfYJAL9u3prBTEDNQOJf9n7yZ7V6uYDU2o nK1t6m6WI61Q+Acv9SUxruMSE4TkzpOONFy9dSrN0YhIBvROjxzMA4CTSdCeYuuEY7yA7kJHYKs +4eIZY/rNXqF9FF0tND3sn0WGelETxG3qqj8m4I1ITJBpOOWKwVUnYsh7vDvNlN5jE0hzuNmaE+ 6AXKWOU7anwMYYv0rIM9E4dc9ulR7LGKmrgSsa/dqbkRLp25L5XQYgFw0CAy+7Xy1EEymoyXm+3 7wwkyQl09CKIWuLwWTLh7jRaBiFzoRxe92ay/nX/t7ahC2nfc0z9heGhhAXRuCScF83VNTomCAk TMZLljAQ0TlI+l+6mavZkXo1tlIi1lXdheDLjw4i2maVTX5WJqFXy1vUwFUcEcE5lU4G+Tl3hjF iLiEOXWthhSyXcU3UEya1TMmVhDhEFzzQzE5iezVqA== 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: linux-rdma@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