All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: <leon@kernel.org>, <dledford@redhat.com>, <jgg@ziepe.ca>,
	<linux-rdma@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Li Zhijian <lizhijian@cn.fujitsu.com>
Subject: [PATCH] IB/mlx5: unify return value to ENOENT
Date: Fri, 3 Sep 2021 16:48:15 +0800	[thread overview]
Message-ID: <20210903084815.184320-1-lizhijian@cn.fujitsu.com> (raw)

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;
-- 
2.31.1




             reply	other threads:[~2021-09-03  8:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  8:48 Li Zhijian [this message]
2021-09-28 17:08 ` [PATCH] IB/mlx5: unify return value to ENOENT Jason Gunthorpe
2021-09-29  4:37   ` lizhijian
2021-10-01 14:45     ` Jason Gunthorpe
2021-10-13  7:26   ` lizhijian
2021-10-13 18:02     ` Jason Gunthorpe
2021-09-29  4:21 ` lizhijian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210903084815.184320-1-lizhijian@cn.fujitsu.com \
    --to=lizhijian@cn.fujitsu.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.