🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24790

Re: [PATCH net-next] eth: bnxt: report TX HW GSO queue stats

#24790
From: Joe Damato
Date: Mon, 30 Nov 2026 21:03
61 lines
14158 bytes
On Fri, Nov 20, 2026 at 03:48:35PM -0800, Jakub Kicinski wrote:
> On Thu, 19 Nov 2026 20:48:03 -0800 Narcisa Vasile wrote:
> > > [Severity: Medium]
> > > Can this over-count wire packets for GSO skbs that were sent through the
> > > TX push path?
> > > 
> > > This block runs before the is_push early-out. It treats every completed
> > > skb with skb_is_gso() && !is_sw_gso as segmented by the hardware.
> > > However, the push path gate in bnxt_start_xmit() does not exclude GSO
> > > skbs:
> > > 
> > > 	if (free_size == bp->tx_ring_size && length <= bp->tx_push_thresh &&
> > > 	    skb_frags_readable(skb) && !lflags) {
> > > 
> > > The push BDs never set TX_BD_FLAGS_LSO or tx_bd_mss, so the NIC sends
> > > the skb as a single frame.
> > > 
> > > Take an idle ring with tx_push_thresh at 164 and a GSO skb of 164 bytes
> > > or less. Two examples are TCP with a peer-advertised MSS of 48 and 96
> > > bytes of payload, or UDP_SEGMENT with gso_size=8 and 80 bytes of
> > > payload. Either skb would be counted as 1 hw_gso_packet plus gso_segs
> > > hw_gso_wire_packets, even though only one frame went on the wire.
> > > 
> > > tso.py reads these counters, so could this give misleading results
> > > there? Fixing the push path issue described below would also fix this.
> > 
> > This couldn't give misleading results there, since no GSO skb in tso.py
> > can be 164 bytes or less, so none can take the push path.
> 
> Fair, but UDP segmentation may sneak in there. I will check with Joe.
> Either way, I agree that this is orthogonal.

OK, so with the small mss USO tests that were just applied [1] I ran the test
on both a thor1 with SW USO and a thor2 with HW USO and the test passed in
both cases.

It seems like the FW on both devices do not advertise TX push.

@Michael, do any devices with recent FW support the push path? If so, I think
HW USO might need a patch to avoid the issue mentioned above, maybe something
like:

--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -606,7 +606,7 @@ static netdev_tx_t bnxt_start_xmit(struc
                lflags |= cpu_to_le32(TX_BD_FLAGS_NO_CRC);

        if (free_size == bp->tx_ring_size && length <= bp->tx_push_thresh &&
-           skb_frags_readable(skb) && !lflags) {
+           !skb_is_gso(skb) && skb_frags_readable(skb) && !lflags) {



It looks to me that the SW USO path is unaffected, so this could only affect
HW USO (I think).

Are there any devices which support HW USO and also TX push? If not, then no
reason to submit a patch for this.

[1]: https://lore.kernel.org/netdev/20261125013838.3823834-1-joe@dama.to/
Technical Details
Message-ID: <aw3kj/qRbgjuNIRA@devvm20253.cco0.facebook.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374463-linux-kernel-netdev=dewy.ru
References: <20261116204313.23023-1-narcisav.kernel@gmail.com> <179499144094.3136.198428718668517773@kernel.org> <av/RAwaDfiQnPmbF@gmail.com> <20261120154835.0f56c410@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374463-linux-kernel-netdev=dewy.ru
From: joe@dama.to (Joe Damato)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] eth: bnxt: report TX HW GSO queue stats
Date: Mon, 30 Nov 2026 13:03:11 -0800
Organization: Usenet Network
Message-ID: <aw3kj/qRbgjuNIRA@devvm20253.cco0.facebook.com>
References: <20261116204313.23023-1-narcisav.kernel@gmail.com>
 <179499144094.3136.198428718668517773@kernel.org>
 <av/RAwaDfiQnPmbF@gmail.com>
 <20261120154835.0f56c410@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1537292"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:akgf3wdoGue1U5DILF0+itnapws= sha256:ky9RWG3WMzzc2ATIdX3i/Xh9TKwwfaktCN5rBvW6iGk=
	sha1:R6Una+fKr3tIf/6UXXJ/gXfhlmo= sha256:3zKqtAZwlDn2o6OGE/2mbOcnGGwqKFRQ+G+3QRKOA0s=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 2EAFB126008; Tue,  1 Dec 2026 00:03:31 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=dama-to.20260707.gappssmtp.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id DVd3_2DCXwD0;
	Tue,  1 Dec 2026 00:03:27 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374463-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=dama.to
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id B82D2125F0B; Tue,  1 Dec 2026 00:03:17 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id B4CE127C18; Mon, 30 Nov 2026 21:03:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796072595;
	b=AylSZlZqSFy1B/6CzjtcM2FTSFRyZCeGtMsYa+ErPXflyAXAoLopAjwhny0J2tMjRTHb
	 wb/bJF9wppKSrPIfreIT4Ku1FDtXDuUuCI83xbYa29H75uCst0xHQJyZk15Mp+LtLo8T0
	 D/dq+e0E0Qx4QC2Ih5FycmoJ9Cpp+MTdnVmM/Zj9uneehXLw2NdjZBhgb3Ims3fgSku4E
	 UheyJt1csLxE+uUXVLtTqnLzw1/mluhJjZeFaEl/Q2HZRRoTeql5yWolXM9aJg4bKqW2S
	 CZZ37iFbqpve9eUFYzn3mO0xUVHvtoMB1m4ePC0Ov4I9zDcRYvGwkCoH+iUR1t6y6tg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796072595;
	h=X-Original-To:Received: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:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=GU3m9AVguxT5hUiMwb7VNkpkH0DBd0rKeo1ZtiOsyyE=;
	b=IQHycunN5pOZYxbxMFkUYVbqxUsFKUP9ctCws7VYHnrwy7aKq3w0iIXA2ANwzYwLCEr6
	 jbdVgf2eJ34PPiN+eorkHtmMsjaIXUqaEVlu22yn/jDOeG6PKxEbkdgW6+1MmsPDKqOTe
	 2RMI9KHeSqLfoImrq64wAsxM8ITHWVc5Wg71eLaOrgaZsnnqucg7Aq2m4xGjdkp6gheVf
	 GNbdcxFEw4WMHi/x6Em6JDTFVJA7DU7OlI9EbTGpsC5Wgqk5OtqqE+Mp/LZUcUkXrMeaM
	 4Ju+cWOgjKjFYwPw6RAzOtR79nna50HjaW8AVWKmM0iTNqkkx/XU6DD+AUD/2YwNvDg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	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=WXwx7OvU;
	dmarc=none header.from=dama.to;
	spf=none smtp.mailfrom=dama.to;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EE5A606A333;
	Mon, 30 Nov 2026 21:03:15 +0000 (UTC)
X-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=WXwx7OvU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.177
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796072594;
	b=hrX0FQi7DZTotaM4Ub7KMBP5ejXPsw/+WjyiBlj5+qG7zyA8qNB8FxnpTVKhRfJMZZiW
	 o+xu8QQLRwHyMcymzmR5cVQvHZLzd5PsyDrJZeNdyzyt9+cvUGIeIZ7af6BvdIWgwjE6A
	 MP3NOWM+aZ2qUGLPi0oENq4G4tD8qXuSpkyhryI1ZaU1ILaprodrXqrhw8XIUDp6VGn7c
	 FGlrPFndb5KKZ2U283IAic7eyIEUM/4mv0nKnSTTRY4/k2VhP5xFrSC2sQ/8uAzCfC38Y
	 gFKOOoCU/KQzUTmaLsXxh/ASaiFDN/EHAPgNlLo/d9HTcV2N2rCmmfNhe7BIufuaQkA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796072594;
	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=GU3m9AVguxT5hUiMwb7VNkpkH0DBd0rKeo1ZtiOsyyE=;
	b=OlBQg5jdeWBGVjNoSJCQNm836Tf80uCOIq9Pz+W1Wg6hMXgtjgLatL0bUTDuPSMxy2Ki
	 n+cTUDJdpiFrnuAjEU3CRfwY5Cx25I+Ex3cka90oQN/NSIZGxKaLgVxpMTtXyNQDIMndj
	 jwQ1Pp/OWAHKtNyNduv81n0XxuPqTii8OLAeZShUVm+S+idGpTrfc7utgl+GZFZAHhjTW
	 hfp1d+F2tKKSV/i2s7MobCekcOKoUG9STWf5KD+OcGee1KmS587YexdOR1NNNqoWSJxUa
	 rzrXw3cOqZpeG5XyBa/5qggrhlvKngA99MPsN5yQo8XwiwJmZHSPw5pcJRtAQSJtBlQ==
X-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=WXwx7OvU;
	arc=none smtp.remote-ip=209.85.214.177
X-Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177])
	(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 8BE98606A31A
	for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 21:03:13 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8BE98606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=dama.to
X-Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2f04f61282dso51723875ad.1
        for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 13:03:13 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=dama-to.20260707.gappssmtp.com; s=20260707; t=1796072593; x=1796677393; 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=GU3m9AVguxT5hUiMwb7VNkpkH0DBd0rKeo1ZtiOsyyE=;
        b=WXwx7OvUxaiMIijX5DJXd7CL9wLtDUv9ZgLMFqeK/PArz/Wr1K5oUk3FaFpTdYBxZd
         CHfdwM3Acn154rvBJC33mU1HaOljs9V/eFsx4LE5s+FcpQ8e/RWLCDwzSGJ4LyTnlDMZ
         1kbZvwzaUdAvJIqgBpmVl+YmEghjjR/WcUSCfxB/eUWqbB8tjZaBx9TbQsZAfozI7yAZ
         GGBZKvrbCuJI8aT+PVg067TwOQIcLggGZPM64lXMU5Rqwt5V6XkVwDEc2p6weBQ+wCbU
         tRcoaq+yjy3/81fVrhmHtmBf8DFX1N1LgX9nIm1ozMJSyA4P0ekpKCvaxqcqsSaYzmn5
         2xwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796072593; x=1796677393;
        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=GU3m9AVguxT5hUiMwb7VNkpkH0DBd0rKeo1ZtiOsyyE=;
        b=1ULOfytDBjcpK8SX7hhVGsaiHGAeEmDywEDLJ6Cn1f8OaSHvwFRj1Y92ZEym5l3oVs
         10EQ+hVjhfXdBX0CdBAaSsgr+wsabBWYPRQWmn5kxcX6KPkpN0GCZxv6k3NPV0LPsD4h
         y0IthWrE0eiftP2DaFRsY6vbSD78txDliAURlWoznRGTghaWLkB9XFMBQTWxlut11MCh
         L2gsDhm9OR5b6IqiHRlVY//DNlZyfAfZSNfn+x4IrKv3W7v3qk1zpBIUfyXIg3BkUhE/
         wp7PGSHgmdOZuVA8NsnrTSnOBdF3xkRJd0CQknkfn1naRtoC4pFjpitqS2RNRsw7SOeA
         0ZPw==
X-Forwarded-Encrypted: i=1; AL+hErH1S4CBjSCFqX5N0WfZkSM0k+gJFg2FHaqeuFI178Y9U5rLFIpAn+3p3MbtlOqcdPA0XbTWHQs=@vger.kernel.org
X-Gm-Message-State: APuU4Z8svGsDPA18doEs6vXHxnUC7y3xklMUjljMSDxgp0ymxZlm9J+O
	FJ/YjNHEcWsGqZ3Gruwuz/vkHyiG31unYXBx7Wv9Wt63eK2rlvkLDCaUukkAxxh3gx0=
X-Gm-Gg: AZFdTZeYEbsfvRRjBM7oOj713P9fZp3z4+ku5qC+D+M6jpaFP4HtVsKYWZuPNqT8S6q
	55Nyn8cgyiY98qUwVUBvyMRuLscV/5+BBvRT/XLJ1zUFTM6DXMUj+tzeKj79n44pqj3AxSIIeYj
	s3xe68p8TLkLuIvSXDBXS0VoXvL24mQmyjOTJEiGH/bBCR4BaRcCyCQLV3xOx+RqJ8r/supz38X
	Lrw98ci3QlsPeTTWVyxx90PPcCantuMic3gmozr3218Dm4NVNCDRcf7IExCZttyU5fmi+5pZpgk
	q/5BqRvxnuGQqi1lY+gectIS4EjCbn1/27aPJuhtaQrRRipmPrTxZfO44ReA8+2kMgDkYB9UYxk
	lExXVsMdP8AmOREnF68k05LWeTFhb2my8LutDTK/HXqJTQPWNv1zUDV4J27z6V+mhNuWy1LBDut
	hUSbo7QQtJI3oFhoERUcl/Y3IOZS8IlEd+JeANjlCSyE79CCqdIFvuYgmnnjltUZP96nJU7kI0K
	Loi+cbnGa5n8dx7nhBBFpfInCA6B044gXy+DJsxLmqoEcjK6erDoc4X64ELzd1Xeq79ZogOdO40
	OGISSjk2eVrcUAnOux7Y+USRTQV04P+lGEzcHP5CBw==
X-Received: by 2002:a17:903:22c8:b0:2e2:dd98:59e8 with SMTP id d9443c01a7336-2f03ef59ce4mr343398005ad.3.1796072592564;
        Mon, 30 Nov 2026 13:03:12 -0800 (PST)
X-Received: from localhost ([2a03:2880:2ff:3::])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f03ee84027sm170541655ad.7.2026.11.30.13.03.11
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 30 Nov 2026 13:03:11 -0800 (PST)
X-Cc: Narcisa Vasile <narcisav.kernel@gmail.com>,
	netdev-bot+sashiko@kernel.org, kuba@kernel.org,
	pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-Mail-Followup-To: Joe Damato <joe@dama.to>, michael.chan@broadcom.com,
	Narcisa Vasile <narcisav.kernel@gmail.com>,
	netdev-bot+sashiko@kernel.org, kuba@kernel.org,
	pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261120154835.0f56c410@kernel.org>