Subject: Re: [RFC net-next v2 00/12] Add TSO map-once DMA helpers and bnxt SW USO support

From: Leon Romanovsky <[email-masked]>
Date: Mon, 16 Mar 2026 21:44:19 +0200

On Thu, Mar 12, 2026 at 03:34:37PM -0700, Joe Damato wrote:
> Greetings:
> 
> This series extends net/tso to add a data structure and some helpers allowing
> drivers to DMA map headers and packet payloads a single time. The helpers can
> then be used to reference slices of shared mapping for each segment. This
> helps to avoid the cost of repeated DMA mappings, especially on systems which
> use an IOMMU.

In modern kernels, it is done by using DMA IOVA API, see NVMe
driver/block layer for the most comprehensive example.

The pseudo code is:
 if (with_iommu)
    use dma_iova_link/dma_iova_unlink
 else
    use dma_map_phys()

https://lore.kernel.org/all/[email-masked]/
https://lore.kernel.org/all/[email-masked]/
https://lwn.net/Articles/997563/

Thanks