• Maxim Mikityanskiy's avatar
    net/mlx5e: Store DMA address inside struct page · ddc87e7d
    Maxim Mikityanskiy authored
    Use page_pool_set_dma_addr() to store the DMA address of a page inside
    struct page, in order to avoid passing struct mlx5e_dma_info to XDP
    handlers. Previously, struct mlx5e_dma_info was used to pass both the
    DMA address and the page, and it worked well for the single-fragment
    case.
    
    When XDP multi buffer is in use, and a fragmented xdp_frame has to be
    transmitted, the driver needs to know the DMA addresses of fragments,
    however, the array of fragments in struct skb_shared_info doesn't
    contain them. In order to pass the DMA addresses, the driver puts them
    into struct page itself, which is accessible from the array of fragments
    in struct skb_shared_info. The existing XDP handlers are modified to
    remove the dependency on struct mlx5e_dma_info.
    Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    ddc87e7d
txrx.h 12.1 KB