1IBV_CREATE_SRQ_EX(3)    Libibverbs Programmer's Manual    IBV_CREATE_SRQ_EX(3)
2
3
4

NAME

6       ibv_create_srq_ex, ibv_destroy_srq - create or destroy a shared receive
7       queue (SRQ)
8

SYNOPSIS

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

DESCRIPTION

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 */
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       };
31
32       struct ibv_srq_attr {
33               uint32_t                max_wr;         /* Requested max number of outstanding work requests (WRs) in the SRQ */
34               uint32_t                max_sge;        /* Requested max number of scatter elements per WR */
35               uint32_t                srq_limit;      /* The limit value of the SRQ */
36       };
37
38       The  function  ibv_create_srq_ex()  will  update  the  srq_init_attr_ex
39       struct with the original values of the SRQ that was created; the values
40       of max_wr and max_sge will be greater  than  or  equal  to  the  values
41       requested.
42
43       ibv_destroy_srq() destroys the SRQ srq.
44

RETURN VALUE

46       ibv_create_srq_ex()  returns  a  pointer to the created SRQ, or NULL if
47       the request fails.
48
49       ibv_destroy_srq() returns 0 on success, or the value of errno on  fail‐
50       ure (which indicates the failure reason).
51

NOTES

53       ibv_destroy_srq() fails if any queue pair is still associated with this
54       SRQ.
55

SEE ALSO

57       ibv_alloc_pd(3), ibv_modify_srq(3), ibv_query_srq(3)
58

AUTHORS

60       Yishai Hadas <yishaih@mellanox.com>
61
62
63
64libibverbs                        2013-06-26              IBV_CREATE_SRQ_EX(3)
Impressum