[net-next v4 10/12] net: bnxt: Dispatch to SW USO

Joe Damato posted 12 patches 2 weeks ago
There is a newer version of this series
[net-next v4 10/12] net: bnxt: Dispatch to SW USO
Posted by Joe Damato 2 weeks ago
Wire in the SW USO path added in preceding commits when hardware USO is
not possible.

When a GSO skb with SKB_GSO_UDP_L4 arrives and the NIC lacks HW USO
capability, redirect to bnxt_sw_udp_gso_xmit() which handles software
segmentation into individual UDP frames submitted directly to the TX
ring.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Joe Damato <joe@dama.to>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d9ca4933ee62..5c3b3adaf701 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -508,6 +508,11 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		}
 	}
 #endif
+	if (skb_is_gso(skb) &&
+	    (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4) &&
+	    !(bp->flags & BNXT_FLAG_UDP_GSO_CAP))
+		return bnxt_sw_udp_gso_xmit(bp, txr, txq, skb);
+
 	free_size = bnxt_tx_avail(bp, txr);
 	if (unlikely(free_size < skb_shinfo(skb)->nr_frags + 2)) {
 		/* We must have raced with NAPI cleanup */
-- 
2.52.0
Re: [net-next v4 10/12] net: bnxt: Dispatch to SW USO
Posted by Pavan Chebbi 2 weeks ago
On Fri, Mar 20, 2026 at 8:12 PM Joe Damato <joe@dama.to> wrote:
>
> Wire in the SW USO path added in preceding commits when hardware USO is
> not possible.
>
> When a GSO skb with SKB_GSO_UDP_L4 arrives and the NIC lacks HW USO
> capability, redirect to bnxt_sw_udp_gso_xmit() which handles software
> segmentation into individual UDP frames submitted directly to the TX
> ring.
>
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Joe Damato <joe@dama.to>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++++
>  1 file changed, 5 insertions(+)
>

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>