public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core] libibverbs/man/ibv_reg_mr.3: Document errno on failure
@ 2023-10-17  5:37 Li Zhijian
  2023-10-17  8:01 ` Markus Armbruster
  0 siblings, 1 reply; 5+ messages in thread
From: Li Zhijian @ 2023-10-17  5:37 UTC (permalink / raw)
  To: linux-rdma; +Cc: jgg, Li Zhijian, Markus Armbruster

'errno' is being widely used by applications when ibv_reg_mr returns NULL.
They all believe errno indicates the error on failure, so let's document
it explicitly.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
 libibverbs/man/ibv_reg_mr.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libibverbs/man/ibv_reg_mr.3 b/libibverbs/man/ibv_reg_mr.3
index 8f323891..d43799c5 100644
--- a/libibverbs/man/ibv_reg_mr.3
+++ b/libibverbs/man/ibv_reg_mr.3
@@ -103,7 +103,7 @@ deregisters the MR
 .I mr\fR.
 .SH "RETURN VALUE"
 .B ibv_reg_mr() / ibv_reg_mr_iova() / ibv_reg_dmabuf_mr()
-returns a pointer to the registered MR, or NULL if the request fails.
+returns a pointer to the registered MR, or NULL if the request fails (and sets errno to indicate the failure reason).
 The local key (\fBL_Key\fR) field
 .B lkey
 is used as the lkey field of struct ibv_sge when posting buffers with
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-18  6:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17  5:37 [PATCH rdma-core] libibverbs/man/ibv_reg_mr.3: Document errno on failure Li Zhijian
2023-10-17  8:01 ` Markus Armbruster
2023-10-18  1:11   ` Zhijian Li (Fujitsu)
2023-10-18  4:45     ` Markus Armbruster
2023-10-18  6:14       ` Zhijian Li (Fujitsu)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox