API usage:
int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr, struct ibv_send_wr **bad_wr)
Input Parameters:
qp struct ibv_qp from ibv_create_qp
wr first work request (WR)
Output Parameters:
bad_wr pointer to first rejected WR
Return Value:
0 on success, -1 on error.
If the call fails, errno will be set to indicate the reason for the failure.
To avoid wrong checking return value, it's better to initialize the
value to be nullptr.
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
++current_buffer;
}
- ibv_send_wr *bad_tx_work_request;
+ ibv_send_wr *bad_tx_work_request = nullptr;
if (ibv_post_send(qp->get_qp(), iswr, &bad_tx_work_request)) {
ldout(cct, 1) << __func__ << " failed to send data"
<< " (most probably should be peer not ready): "
wr.num_sge = 0;
wr.opcode = IBV_WR_SEND;
wr.send_flags = IBV_SEND_SIGNALED;
- ibv_send_wr* bad_tx_work_request;
+ ibv_send_wr* bad_tx_work_request = nullptr;
if (ibv_post_send(qp->get_qp(), &wr, &bad_tx_work_request)) {
ldout(cct, 1) << __func__ << " failed to send message="
<< " ibv_post_send failed(most probably should be peer not ready): "