diff mbox series

[4/5] Providers/rxe: Support get srq number

Message ID 20210730152157.67592-5-rpearsonhpe@gmail.com (mailing list archive)
State Not Applicable
Headers show
Series Providers/rxe: Implement XRC transport for rxe | expand

Commit Message

Bob Pearson July 30, 2021, 3:21 p.m. UTC
Add support for ibv_get_srq_num verb.

Signed-off-by: Bob Pearson <rpearson@gmail.com>
---
 providers/rxe/rxe.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c
index 9cdddb8c..d4538713 100644
--- a/providers/rxe/rxe.c
+++ b/providers/rxe/rxe.c
@@ -696,6 +696,14 @@  static struct ibv_srq *rxe_create_srq_ex(struct ibv_context *context,
 	return &srq->vsrq.srq;
 }
 
+static int rxe_get_srq_num(struct ibv_srq *ibsrq, uint32_t *srq_num)
+{
+	struct rxe_srq *srq = to_rsrq(ibsrq);
+
+	*srq_num = srq->vsrq.srq_num;
+	return 0;
+}
+
 static int rxe_modify_srq(struct ibv_srq *ibsrq,
 		   struct ibv_srq_attr *attr, int attr_mask)
 {
@@ -1836,6 +1844,7 @@  static const struct verbs_context_ops rxe_ctx_ops = {
 	.query_srq = rxe_query_srq,
 	.destroy_srq = rxe_destroy_srq,
 	.post_srq_recv = rxe_post_srq_recv,
+	.get_srq_num = rxe_get_srq_num,
 	.create_qp = rxe_create_qp,
 	.create_qp_ex = rxe_create_qp_ex,
 	.query_qp = rxe_query_qp,