On 2019-04-17 22:56, Jonathan Lemon wrote:
> data starts at handle + headroom, so adjust appropriately.
> 
> Signed-off-by: Jonathan Lemon <jonathan.le...@gmail.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c 
> b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
> index 2f0b5fd1ee97..e758f1015022 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
> @@ -290,7 +290,8 @@ int mlx5e_xsk_page_alloc_umem(struct mlx5e_rq *rq,
>               return -ENOMEM;
>   
>       dma_info->xsk.handle = handle + rq->buff.umem_headroom;
> -     dma_info->xsk.data = xdp_umem_get_data(umem, handle);
> +     dma_info->xsk.data = xdp_umem_get_data(umem, handle) +
> +                          rq->buff.umem_headroom;
>   
>       /* No need to add headroom to the DMA address. In striding RQ case, we
>        * just provide pages for UMR, and headroom is counted at the setup
> 

This code is not upstreamed yet, please hold on with sending patches to 
netdev. You are not even working with the latest codebase. You shouldn't 
have exposed it before the submission. Please refrain from doing it for now.

If you have fixes like this, I'm happy to hear from you, but please 
provide your feedback internally. Your fixes may not apply cleanly, 
because I'm constantly updating the code, or these issues may be already 
fixed in the code that you haven't seen yet, so let's sync internally 
before it goes upstream.

Thanks,
Max

Reply via email to