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

NAME

6       ibv_post_send - post a list of work requests (WRs) to a send queue
7

SYNOPSIS

9       #include <infiniband/verbs.h>
10
11       int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr,
12                         struct ibv_send_wr **bad_wr);
13

DESCRIPTION

15       ibv_post_send()  posts  the linked list of work requests (WRs) starting
16       with wr to the send queue of the queue pair qp.   It  stops  processing
17       WRs  from  this list at the first failure (that can be detected immedi‐
18       ately while requests are being posted), and  returns  this  failing  WR
19       through bad_wr.
20
21       The  argument  wr  is  an  ibv_send_wr  struct,  as defined in <infini‐
22       band/verbs.h>.
23
24       struct ibv_send_wr {
25               uint64_t                wr_id;                  /* User defined WR ID */
26               struct ibv_send_wr     *next;                   /* Pointer to next WR in list, NULL if last WR */
27               struct ibv_sge         *sg_list;                /* Pointer to the s/g array */
28               int                     num_sge;                /* Size of the s/g array */
29               enum ibv_wr_opcode      opcode;                 /* Operation type */
30               enum ibv_send_flags     send_flags;             /* Flags of the WR properties */
31               uint32_t                imm_data;               /* Immediate data (in network byte order) */
32               union {
33                       struct {
34                               uint64_t        remote_addr;    /* Start address of remote memory buffer */
35                               uint32_t        rkey;           /* Key of the remote Memory Region */
36                       } rdma;
37                       struct {
38                               uint64_t        remote_addr;    /* Start address of remote memory buffer */
39                               uint64_t        compare_add;    /* Compare operand */
40                               uint64_t        swap;           /* Swap operand */
41                               uint32_t        rkey;           /* Key of the remote Memory Region */
42                       } atomic;
43                       struct {
44                               struct ibv_ah  *ah;             /* Address handle (AH) for the remote node address */
45                               uint32_t        remote_qpn;     /* QP number of the destination QP */
46                               uint32_t        remote_qkey;    /* Q_Key number of the destination QP */
47                       } ud;
48               } wr;
49       };
50
51       struct ibv_sge {
52               uint64_t                addr;                   /* Start address of the local memory buffer */
53               uint32_t                length;                 /* Length of the buffer */
54               uint32_t                lkey;                   /* Key of the local Memory Region */
55       };
56
57       Each QP Transport Service Type supports a specific set of  opcodes,  as
58       shown in the following table:
59
60       OPCODE                      | IBV_QPT_UD | IBV_QPT_UC | IBV_QPT_RC
61       ----------------------------+------------+------------+-----------
62       IBV_WR_SEND                 |     X      |     X      |     X
63       IBV_WR_SEND_WITH_IMM        |     X      |     X      |     X
64       IBV_WR_RDMA_WRITE           |            |     X      |     X
65       IBV_WR_RDMA_WRITE_WITH_IMM  |            |     X      |     X
66       IBV_WR_RDMA_READ            |            |            |     X
67       IBV_WR_ATOMIC_CMP_AND_SWP   |            |            |     X
68       IBV_WR_ATOMIC_FETCH_AND_ADD |            |            |     X
69
70       The  attribute  send_flags  describes  the  properties of the WR. It is
71       either 0 or the bitwise OR of one or more of the following flags:
72
73       IBV_SEND_FENCE  Set the fence indicator. Valid only for QPs with Trans‐
74       port Service Type IBV_QPT_RC
75
76       IBV_SEND_SIGNALED   Set the completion notification indicator. Relevant
77       only if QP was created with sq_sig_all=0
78
79       IBV_SEND_SOLICITED  Set the solicited event indicator. Valid  only  for
80       Send and RDMA Write with immediate
81
82       IBV_SEND_INLINE  Send data in given gather list as inline data
83              in  a  send WQE.  Valid only for Send and RDMA Write.  The L_Key
84              will not be checked.
85

RETURN VALUE

87       ibv_post_send() returns 0 on success, or the value of errno on  failure
88       (which indicates the failure reason).
89

NOTES

91       The  user  should  not  alter  or destroy AHs associated with WRs until
92       request is fully executed and a work completion has been retrieved from
93       the corresponding completion queue (CQ) to avoid unexpected behavior.
94
95       The buffers used by a WR can only be safely reused after WR the request
96       is fully executed and a work completion has  been  retrieved  from  the
97       corresponding completion queue (CQ).
98

SEE ALSO

100       ibv_create_qp(3),          ibv_create_ah(3),          ibv_post_recv(3),
101       ibv_post_srq_recv(3), ibv_poll_cq(3)
102

AUTHORS

104       Dotan Barak <dotanb@mellanox.co.il>
105
106
107
108libibverbs                        2006-10-31                  IBV_POST_SEND(3)
Impressum