]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: bnxt: Dispatch to SW USO
authorJoe Damato <joe@dama.to>
Wed, 8 Apr 2026 23:05:58 +0000 (16:05 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sun, 12 Apr 2026 17:54:33 +0000 (10:54 -0700)
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>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260408230607.2019402-10-joe@dama.to
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 26aae48a7d0ec4c28e1a19c17080ae1817e3eaef..2715632115a5f55b7e052654dc786c2cd362a6d1 100644 (file)
@@ -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 */