]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: bnxt: Add SW GSO completion and teardown support
authorJoe Damato <joe@dama.to>
Wed, 8 Apr 2026 23:05:57 +0000 (16:05 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sun, 12 Apr 2026 17:54:32 +0000 (10:54 -0700)
commit87550ba2dc39489be292ecb485118ea662800b82
tree605691c4505de6641fcb81c4bae57a6afdadb505
parentcc5d90667db81474ed7a92a1b2fa3daec5559307
net: bnxt: Add SW GSO completion and teardown support

Update __bnxt_tx_int and bnxt_free_one_tx_ring_skbs to handle SW GSO
segments:

- MID segments: adjust tx_pkts/tx_bytes accounting and skip skb free
  (the skb is shared across all segments and freed only once)

- LAST segments: call tso_dma_map_complete() to tear down the IOVA
  mapping if one was used. On the fallback path, payload DMA unmapping
  is handled by the existing per-BD dma_unmap_len walk.

Both MID and LAST completions advance tx_inline_cons to release the
segment's inline header slot back to the ring.

is_sw_gso is initialized to zero, so the new code paths are not run.

Add logic for feature advertisement and guardrails for ring sizing.

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-9-joe@dama.to
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_gso.h