From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796146566; b=zwO/qjXD9ccqDxOEZzdji+yaG4kPGqEPA4OuOUR4EB5k9AnI6uZ5b1RIKjGsEHVA3hS8 qEXiaWs3xEXnujv/kAiCwb9fzXb1ZNUQJ6zSJK1e5Lu7L6jPws+k+hImGto+w4FhI3TKu Z7HpnTEzWDdP2d1uOtBy3atCutYD0BGTmtNUmL4LUeZuTGBDqDCNonNDqmwjCIMgUsowU M3ZvTeQOajEZ8QSIqJy/M0q6CKkDWkI8vqW+rx/tGj19znlf0uKgCsGcphRhv6Oil+7Qa 33cstSL0qxfIHqhn9ECwGPWFaA/3W4vADx8Grgy6DVHEH/gKZESxowdK19Z3KuCXErg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796146566; 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=xgthb7rmO4B+vRzWuACLfiwQ1cs3nDxGzHhQ0czZxFnhXsLNth32oFSABEhG98YoJW6E gQSc8xV5EUdnwoTjhhgooUPT7GzB1zDlVjOauJ33gtLbPszd0gXWvcXSPZaTHm+gWaiGI oJSuqE6Mo7/6kkbssNscz1M+wZo8WCEf9/OFlB2OPbL+8xk3b+oe3DSL86AcoNUC+j2V3 peFQlInWsUQCjwLysKUfzug0YXOSqHoodZu+CtbqbPAQgGsN1o3oTHxnqzT8wVzRAO00R wHQRwyo9udINETMdrd4mxo+UxvoaJFDMJlCxljBcV3KEUdrW+INWXMo5fk3DLHLOnPw== 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.173 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (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 90D25606A689 for ; Tue, 1 Dec 2026 17:36:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 90D25606A689 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-f173.google.com with SMTP id d2e1a72fcca58-8a06e79e152so5855510b3a.0 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=TqW4IL6j9UF6pOLgDsF0UDOI54AaTx65S2tEG/gIsouH/fIGoca5ujl8qdy0cBl0kz pDGwolf7lnAqUgNmMbrzRVaiYMHzbdtdboxGssUegBzJ5dg5cxmlYBI7MQrgdkRqV36c MPyDWRtjCVqh3DUp1HfzlFsKKqCvUmd5wVIt9RaNkgMD3tZvkgYd1vMZ+3Y4HWMVLmC5 gXkqCSQk1YaeJG3/XELeEp9DOVy40KRbBVPsn5VZeStYWIOuSFPfgXM6O6ChxCJZ6tdm 51KB1GFEdelGc+TKfRBff9Oe2g6NCmPnmkoAVAuBfeYl6EvxnatdDpngh4DgjnEGfVlf QMVw== X-Forwarded-Encrypted: i=1; AL+hErHd1rHBNJBz+gz9Qct5Pkps38h5s0dUlyfMv4Ud500kjsQqUirlTs60IO1i+1xd9AV/YlkSADS17Zvg6jU=@vger.kernel.org X-Gm-Message-State: APuU4Z/hlm7RuJV8/yeIS6l/dA8lkGTRFu4jy8ZEnBTa1AhoaI1xOLyq KTAAcpw2ABruZDHDovLGACJfOxLzdetcuVZ/w57Gx6IJVN9x1flICF/c2ZcPU2LEvCM= X-Gm-Gg: AZFdTZdGL8vSKbObxvD7dXTWX0yBNwMKFZDUVDqDr8sb6l1/PbTe6VEpEumXx6kTlTY HQNUE9mCWz5PUrydKduKU7q3+6fBaul8AqPJdDGrZ0eABNe4W7mrDdzWD+4rbU1F9RPI4TxBfpZ JxoNJhxhHTcWtCFbq/KjIweh/YxOLXRjyk5CcQy4F13JJn0T1CuaA3RDb4jhXxNNiv///QVgdBg z4OgXzL/7flLbzYZFeHffERGLWBwK5GepKy4MPHA94jRFCoNTTsVP3eNDPRj93777/RPr460q6X 059Cdh8/3DXBtwVCRcV8TmkfOd7ZuvEWC7a7+0aXNQTvHu+25fqk2L4x7C7gyjk9l6BO5amThmI ur9NBaoPmXUuCgkPIAdsuOoGL76VHBtstpgSyeEGFAqhCxM7qYCx4s4cFpteMiXVNfY1j5uBVth 0KTLvLCUCyOuYGJHtwdkZ5FCd26pTM9k2CDLuz//Qx4GGskkpEdZLqedVJJuDfxPTmMo7Ojv+X5 2KlDO0j5VZQ2m4H5fEVucm4GPV8/irwtAXupZ5Fu2fhKcb3CooAG+VWpvebX3ezSWk441cOX1zc 1MLeOWp0cyVytSMhfYio9eY/XtAAwddDd0vhduezGA== 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-hyperv@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