From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796072594; b=xg3FoFQ8gvibSpmzxuJ+JP7tDRoJEGAKuyq6hxYcuxMt/YEUGfS8qeRAfZJJvo5ZWHrP yORShmxBxanMW2ZXnHt4MJ6d7I2ZqWUGk9hYljcGpoSwtXAPZ9l03E+NatKOmNlkKczF7 5yUwuA7HDSS8cnCPBscPLC4xAVvCOxPeqaK5twYRXgHDMZOD03o9AbO3DoC6sZYIT+9+8 a5rCii5aAQCTf/3UTpWECA0oqZXoMOwKigiOwmrN/WzwTDJmPR4lyI46Fi5ayU9RKVNZ6 oWTDOJbIr0WKpQzJE6nHyk5kgMJKRvIgiebeo36j0AMOcYR5CSjrOxQbKInQ4AvGlyg== 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=kdcpkr89yUiIfKR/ouK4EErsUEdFStTg+Z4TlAukiRxDjyHynsQbkGjfwMyGiVauPZWz NUnSuRVAkyFUcLDliRqSYdvJl+TIHobvXepXNewhGoih7jOO6X/Oq8x9l7e+su+suNe7/ tXKkhXgDhy44KmewNCH8w7XoEaNPFRPZo+kblitpyOTmLqRXZwkpYBiLW9nJjcq1yx+ao 5O5DWOVuMq08OpgNfTa3xA7Lc6kn0YJwdSUoCjk8k2C0AQxRXqFJyAPlQ77G2TM94XMFG l43GRyERyrKSn6da3AnoDXOqoehoqLlA2zfsny7Xg5M7lkBvjXLTywXScl/gG+7OM2A== 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.182 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 912B7606A320 for ; Mon, 30 Nov 2026 21:03:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 912B7606A320 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=WXwx7OvU Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2f03eeda984so59614045ad.2 for ; Mon, 30 Nov 2026 13:03:13 -0800 (PST) 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=ULrz6EgdpOjCawa3+6kmAl6YvJf51gW5XHjvNo/pnYwcR2MJNQMoK74DQ7tzpokx86 MwigO0tcvYgvSV24zTGazx/XGOVfs7W1za9YKYjroGlRx6Cu4N7qJWSHeqLB4MMGYbdD nX6kd/GX2OzPUvuEW1uM3EBsAqIjcafxqFzLcJs+oOK2sarlg2A+eB5qd9oUhQMYw4L5 0VXoBUmsRdkF8zh3Zd79/7cblsIeavsndCpYqqTSxU3UwMsypKiaugVhclQQAHV+HEUo 4IBvWCyLrDGfJaDLbQwXnJCdpmODEWLfu69UC9xef10Au/g6Sa4s+w0lL4rjhZau/c1/ dN8g== X-Forwarded-Encrypted: i=1; AL+hErGIG8itbcDh7hND8XunaB4VNk7+FdMbEgec7YOgufGKncc0k3Pdgb3bKPAwz2hJ3b+Atrg0h7bI6AQJBYo=@vger.kernel.org X-Gm-Message-State: APuU4Z+Pbsc0LX5dKjALRmUzCg0vBF3mt4foTjNHm+LoU5AFVQU8zNmc fYoBxgpmi9/U0Qth+y+KbYR74+mW3UruPSSCK+SwPjqBim5kC7CMMO+oyDaI/E/qM7o= X-Gm-Gg: AZFdTZfTpIaPuUVxcUAj8+PC1LiC/RISMg6qexAJmAdO8tJTnOrME0D5HhPqddtBkES 3INS/kLG1uH/HcRwKySq39TWM91buq+xZ+JSXxNRhBd9QE/DA6NdNrQrITFF4HyUHkTwUXRU0pL +WGlMTBe+sTmoj7Ed1hVyz5uX5Mivj5FNxy9lVSpFg/HZpF9iq/FK4PgkKrd82hYhoF3WC14uoG 0xD7ezNyfP4kgGUR5aH2OYwb86/KGnCzibCbga741fIWHJX4KXYLCR8cY5jtI5aJleEQJ6fsUiK r9lRHmZTf3yKq+JZQMW/4ZxzdQ2rlVa0PSp28gjlEnAlu2whiFKjcuwqAI83925AD+iKFyrP+f/ x7EXWaXTKfOvm8oFOACkm2OSPBW/qqfFD5BsaRS5XIm3IXqkBoMLOaZexMuMpjMVTP5QsG6uVW+ YCokfbBlAkmq6TWWM8YWFTrb54oDp8hZXwaRZCc1Fr6LwYW/ATsr3SEtoGpP4nHaKFx4XuDbj7g 3iR6sVdPIuzDyBqNPH0TyrebkzjXtLvSRLPBBIvdJqQ8EPb48ic876fGk5Z2NHuWbJluSX3XPIk Nh0dwzXNnR5C7bCB72RJFKgEVHZeNkCnaFwn8WQPUg== 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) 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) Date: Mon, 30 Nov 2026 13:03:11 -0800 From: Joe Damato To: michael.chan@broadcom.com Cc: Narcisa Vasile , 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 Subject: Re: [PATCH net-next] eth: bnxt: report TX HW GSO queue stats Message-ID: Mail-Followup-To: Joe Damato , michael.chan@broadcom.com, Narcisa Vasile , 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 References: <20261116204313.23023-1-narcisav.kernel@gmail.com> <179499144094.3136.198428718668517773@kernel.org> <20261120154835.0f56c410@kernel.org> X-Mailing-List: linux-kernel@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: <20261120154835.0f56c410@kernel.org> 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/