Re: [net-next v4 09/12] net: bnxt: Add SW GSO completion and teardown support
From: Pavan Chebbi
Date: Sat Mar 21 2026 - 03:30:35 EST
On Fri, Mar 20, 2026 at 8:12 PM Joe Damato <joe@xxxxxxx> wrote:
>
> 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: if the DMA IOVA path was used, use dma_iova_destroy to
> tear down the contiguous mapping. 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.
>
> Suggested-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> Signed-off-by: Joe Damato <joe@xxxxxxx>
> ---
> v3:
> - completion paths updated to use DMA IOVA APIs to teardown mappings.
>
> rfcv2:
> - Update the shared header buffer consumer on TX completion.
>
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 82 +++++++++++++++++--
> .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 19 ++++-
> 2 files changed, 91 insertions(+), 10 deletions(-)
>
Reviewed-by: Pavan Chebbi <pavan.chebbi@xxxxxxxxxxxx>
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature