1IBV_CREATE_SRQ_EX(3) Libibverbs Programmer's Manual IBV_CREATE_SRQ_EX(3)
2
3
4
6 ibv_create_srq_ex, ibv_destroy_srq - create or destroy a shared receive
7 queue (SRQ)
8
10 #include <infiniband/verbs.h>
11
12 struct ibv_srq *ibv_create_srq_ex(struct ibv_context *context, struct
13 ibv_srq_init_attr_ex *srq_init_attr_ex);
14
15 int ibv_destroy_srq(struct ibv_srq *srq);
16
18 ibv_create_srq_ex() creates a shared receive queue (SRQ) supporting
19 both basic and xrc modes. The argument srq_init_attr_ex is an
20 ibv_srq_init_attr_ex struct, as defined in <infiniband/verbs.h>.
21
22 struct ibv_srq_init_attr_ex {
23 void *srq_context; /* Associated context of the SRQ */
24 struct ibv_srq_attr attr; /* SRQ attributes */
25 uint32_t comp_mask; /* Identifies valid fields */
26 enum ibv_srq_type srq_type; /* Basic / XRC / tag matching */
27 struct ibv_pd *pd; /* PD associated with the SRQ */
28 struct ibv_xrcd *xrcd; /* XRC domain to associate with the SRQ */
29 struct ibv_cq *cq; /* CQ to associate with the SRQ for XRC mode */
30 struct ibv_tm_cap tm_cap; /* Tag matching attributes */
31 };
32
33 struct ibv_srq_attr {
34 uint32_t max_wr; /* Requested max number of outstanding work requests (WRs) in the SRQ */
35 uint32_t max_sge; /* Requested max number of scatter elements per WR */
36 uint32_t srq_limit; /* The limit value of the SRQ */
37 };
38
39 struct ibv_tm_cap {
40 uint32_t max_num_tags; /* Tag matching list size */
41 uint32_t max_ops; /* Number of outstanding tag list operations */
42 };
43
44
45 The function ibv_create_srq_ex() will update the srq_init_attr_ex
46 struct with the original values of the SRQ that was created; the values
47 of max_wr and max_sge will be greater than or equal to the values
48 requested.
49
50 ibv_destroy_srq() destroys the SRQ srq.
51
53 ibv_create_srq_ex() returns a pointer to the created SRQ, or NULL if
54 the request fails.
55
56 ibv_destroy_srq() returns 0 on success, or the value of errno on fail‐
57 ure (which indicates the failure reason).
58
60 ibv_destroy_srq() fails if any queue pair is still associated with this
61 SRQ.
62
64 ibv_alloc_pd(3), ibv_modify_srq(3), ibv_query_srq(3)
65
67 Yishai Hadas <yishaih@mellanox.com>
68
69
70
71libibverbs 2013-06-26 IBV_CREATE_SRQ_EX(3)