lkml.org 
[lkml]   [2021]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] IB/mlx5: unify return value to ENOENT
Date
ping


On 03/09/2021 16:48, Li Zhijian wrote:
> Previously, ENOENT or EINVAL will be returned by ibv_advise_mr() although
> the errors all occur at get_prefetchable_mr().
>
> flags = IBV_ADVISE_MR_FLAG_FLUSH:
> mlx5_ib_advise_mr_prefetch()
> -> mlx5_ib_prefetch_sg_list()
> -> get_prefetchable_mr()
> return -ENOENT;
>
> flags = 0:
> mlx5_ib_advise_mr_prefetch()
> -> init_prefetch_work()
> -> get_prefetchable_mr()
> return -EINVAL;
>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
> drivers/infiniband/hw/mlx5/odp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
> index d0d98e584ebc..52572e7ea6f6 100644
> --- a/drivers/infiniband/hw/mlx5/odp.c
> +++ b/drivers/infiniband/hw/mlx5/odp.c
> @@ -1828,7 +1828,7 @@ int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
>
> if (!init_prefetch_work(pd, advice, pf_flags, work, sg_list, num_sge)) {
> destroy_prefetch_work(work);
> - return -EINVAL;
> + return -ENOENT;
> }
> queue_work(system_unbound_wq, &work->work);
> return 0;
\
 
 \ /
  Last update: 2021-09-29 06:30    [W:0.107 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site