From: Jakub Kicinski <kuba@kernel.org>
To: Joe Damato <joe@dama.to>
Cc: netdev@vger.kernel.org, Michael Chan <michael.chan@broadcom.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
andrew+netdev@lunn.ch, horms@kernel.org,
pavan.chebbi@broadcom.com, linux-kernel@vger.kernel.org,
leon@kernel.org
Subject: Re: [net-next v6 09/12] net: bnxt: Add SW GSO completion and teardown support
Date: Mon, 30 Mar 2026 16:57:48 -0700 [thread overview]
Message-ID: <20260330165748.2edb501a@kernel.org> (raw)
In-Reply-To: <20260326235238.2940471-10-joe@dama.to>
On Thu, 26 Mar 2026 16:52:28 -0700 Joe Damato wrote:
> @@ -4645,6 +4687,10 @@ static int bnxt_init_tx_rings(struct bnxt *bp)
>
> bp->tx_wake_thresh = max_t(int, bp->tx_ring_size / 2,
> BNXT_MIN_TX_DESC_CNT);
> + if (!(bp->flags & BNXT_FLAG_UDP_GSO_CAP) &&
> + (bp->dev->features & NETIF_F_GSO_UDP_L4))
> + bp->tx_wake_thresh = max_t(int, bp->tx_wake_thresh,
> + BNXT_SW_USO_MAX_DESCS);
>
> for (i = 0; i < bp->tx_nr_rings; i++) {
> struct bnxt_tx_ring_info *txr = &bp->tx_ring[i];
> @@ -13832,6 +13878,11 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,
> if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp, false))
> features &= ~NETIF_F_NTUPLE;
>
> + if ((features & NETIF_F_GSO_UDP_L4) &&
> + !(bp->flags & BNXT_FLAG_UDP_GSO_CAP) &&
> + bp->tx_ring_size < 2 * BNXT_SW_USO_MAX_DESCS)
> + features &= ~NETIF_F_GSO_UDP_L4;
> +
> if ((bp->flags & BNXT_FLAG_NO_AGG_RINGS) || bp->xdp_prog)
> features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW);
>
> @@ -13877,6 +13928,15 @@ static int bnxt_set_features(struct net_device *dev, netdev_features_t features)
> int rc = 0;
> bool re_init = false;
>
> + if (!(bp->flags & BNXT_FLAG_UDP_GSO_CAP)) {
> + if (features & NETIF_F_GSO_UDP_L4)
> + bp->tx_wake_thresh = max_t(int, bp->tx_wake_thresh,
> + BNXT_SW_USO_MAX_DESCS);
> + else
> + bp->tx_wake_thresh = max_t(int, bp->tx_ring_size / 2,
> + BNXT_MIN_TX_DESC_CNT);
Adding extra handling for min ring size all over the place looks a bit
messy. Can you factor something out of this logic?
next prev parent reply other threads:[~2026-03-30 23:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 23:52 [net-next v6 00/12] Add TSO map-once DMA helpers and bnxt SW USO support Joe Damato
2026-03-26 23:52 ` [net-next v6 01/12] net: tso: Introduce tso_dma_map Joe Damato
2026-03-29 22:11 ` Jakub Kicinski
2026-03-30 16:45 ` Joe Damato
2026-03-26 23:52 ` [net-next v6 02/12] net: tso: Add tso_dma_map helpers Joe Damato
2026-03-26 23:52 ` [net-next v6 03/12] net: bnxt: Export bnxt_xmit_get_cfa_action Joe Damato
2026-03-26 23:52 ` [net-next v6 04/12] net: bnxt: Add a helper for tx_bd_ext Joe Damato
2026-03-26 23:52 ` [net-next v6 05/12] net: bnxt: Use dma_unmap_len for TX completion unmapping Joe Damato
2026-03-26 23:52 ` [net-next v6 06/12] net: bnxt: Add TX inline buffer infrastructure Joe Damato
2026-03-26 23:52 ` [net-next v6 07/12] net: bnxt: Add boilerplate GSO code Joe Damato
2026-03-29 22:12 ` Jakub Kicinski
2026-03-30 16:45 ` Joe Damato
2026-03-26 23:52 ` [net-next v6 08/12] net: bnxt: Implement software USO Joe Damato
2026-03-29 22:20 ` Jakub Kicinski
2026-03-30 16:53 ` Joe Damato
2026-03-30 23:53 ` Jakub Kicinski
2026-03-31 21:11 ` Joe Damato
2026-04-01 4:34 ` Pavan Chebbi
2026-03-26 23:52 ` [net-next v6 09/12] net: bnxt: Add SW GSO completion and teardown support Joe Damato
2026-03-29 22:22 ` Jakub Kicinski
2026-03-30 17:07 ` Joe Damato
2026-03-30 23:59 ` Jakub Kicinski
2026-03-30 23:57 ` Jakub Kicinski [this message]
2026-03-31 21:14 ` Joe Damato
2026-04-01 1:03 ` Jakub Kicinski
2026-03-26 23:52 ` [net-next v6 10/12] net: bnxt: Dispatch to SW USO Joe Damato
2026-03-26 23:52 ` [net-next v6 11/12] net: netdevsim: Add support for " Joe Damato
2026-03-29 22:26 ` Jakub Kicinski
2026-03-30 17:12 ` Joe Damato
2026-03-26 23:52 ` [net-next v6 12/12] selftests: drv-net: Add USO test Joe Damato
2026-03-29 22:31 ` Jakub Kicinski
2026-03-30 17:25 ` Joe Damato
2026-03-30 23:50 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260330165748.2edb501a@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=joe@dama.to \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox