Skip to content

Commit df1dcc0

Browse files
authoredDec 19, 2024
Create receive-request.c
1 parent 1b0981e commit df1dcc0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎receive-request.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
//Post Receive Request
4+
5+
int ibv_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr,
6+
struct ibv_recv_wr **bad_wr);
7+
8+
//Post Send Request
9+
10+
int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr,
11+
struct ibv_send_wr **bad_wr);
12+
13+
/* Warning: bad_wr is mandatory; It will be assigned with the address of
14+
the Receive Request that its posting failed */
15+
16+
struct ibv_recv_wr {
17+
uint64_t wr_id; // Private context, available in the corresponding Work Completion
18+
struct ibv_recv_wr *next; // Address of the next Receive Request. NULL in the last Request
19+
struct ibv_sge *sg_list; // Array of scatter elements
20+
int num_sge; // Number of elements in sg_list
21+
};

0 commit comments

Comments
 (0)
Please sign in to comment.