[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2decb1e-8776-5192-e3ec-6d700faa019d@fujitsu.com>
Date: Wed, 29 Sep 2021 04:21:19 +0000
From: "lizhijian@...itsu.com" <lizhijian@...itsu.com>
To: "leon@...nel.org" <leon@...nel.org>,
"dledford@...hat.com" <dledford@...hat.com>,
"jgg@...pe.ca" <jgg@...pe.ca>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lizhijian@...itsu.com" <lizhijian@...itsu.com>
Subject: Re: [PATCH] IB/mlx5: unify return value to ENOENT
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@...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;
Powered by blists - more mailing lists