[PATCH rdma-core 4/8] verbs: Fix ibv_get_srq_num() man page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix ibv_get_srq_num() man page to mention that it's applicable only when
the given SRQ is an XRC as defined by its specification.

Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
---
 libibverbs/man/ibv_get_srq_num.3.md | 2 +-
 providers/mlx5/verbs.c              | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libibverbs/man/ibv_get_srq_num.3.md b/libibverbs/man/ibv_get_srq_num.3.md
index f015b9e..9140a37 100644
--- a/libibverbs/man/ibv_get_srq_num.3.md
+++ b/libibverbs/man/ibv_get_srq_num.3.md
@@ -23,7 +23,7 @@ int ibv_get_srq_num(struct ibv_srq *srq, uint32_t *srq_num);
 
 # DESCRIPTION
 
-**ibv_get_srq_num()** return srq number associated with the given shared
+**ibv_get_srq_num()** return srq number associated with the given XRC shared
 receive queue The argument *srq* is an ibv_srq struct, as defined in
 <infiniband/verbs.h>. *srq_num* is an output parameter that holds the returned
 srq number.
diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c
index 47e8380..1835e93 100644
--- a/providers/mlx5/verbs.c
+++ b/providers/mlx5/verbs.c
@@ -2898,8 +2898,12 @@ int mlx5_get_srq_num(struct ibv_srq *srq, uint32_t *srq_num)
 {
 	struct mlx5_srq *msrq = to_msrq(srq);
 
+	/* May be used by DC users in addition to XRC ones, as there is no
+	 * indication on the SRQ for DC usage we can't force the above check.
+	 * Even DC users are encouraged to use mlx5dv_init_obj() to get
+	 * the SRQN.
+	 */
 	*srq_num = msrq->srqn;
-
 	return 0;
 }
 
-- 
1.8.3.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux