3 .TH IBV_CREATE_SRQ 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
5 ibv_create_srq, ibv_destroy_srq \- create or destroy a shared receive queue (SRQ)
8 .B #include <infiniband/verbs.h>
10 .BI "struct ibv_srq *ibv_create_srq(struct ibv_pd " "*pd" ", struct "
11 .BI " ibv_srq_init_attr " "*srq_init_attr" );
13 .BI "struct ibv_srq *ibv_create_xrc_srq(struct ibv_pd " "*pd" ",
14 .BI " struct ibv_xrc_domain " "*xrc_domain" ",
15 .BI " struct ibv_cq " "*xrc_cq" ",
16 .BI " struct ibv_srq_init_attr " "*srq_init_attr" );
18 .BI "int ibv_destroy_srq(struct ibv_srq " "*srq" );
22 creates a shared receive queue (SRQ) associated with the protection domain
25 .B ibv_create_xrc_srq()
26 creates an XRC shared receive queue (SRQ) associated with the protection domain
30 and the CQ which will hold the XRC completion
35 is an ibv_srq_init_attr struct, as defined in <infiniband/verbs.h>.
38 struct ibv_srq_init_attr {
40 void *srq_context; /* Associated context of the SRQ */
41 struct ibv_srq_attr attr; /* SRQ attributes */
48 uint32_t max_wr; /* Requested max number of outstanding work requests (WRs) in the SRQ */
49 uint32_t max_sge; /* Requested max number of scatter elements per WR */
50 uint32_t srq_limit; /* The limit value of the SRQ (irrelevant for ibv_create_srq) */
59 struct with the original values of the SRQ that was created; the
60 values of max_wr and max_sge will be greater than or equal to the
68 returns a pointer to the created SRQ, or NULL if the request fails.
71 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
74 fails if any queue pair is still associated with this SRQ.
77 .BR ibv_modify_srq (3),
81 Dotan Barak <dotanb@mellanox.co.il>