From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.177 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== 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== 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 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 ; Mon, 30 Nov 2026 21:03:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8BE98606A31A 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=WXwx7OvU Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2f04f61282dso51723875ad.1 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=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) 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: 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: <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/