| 1047 | } |
| 1048 | |
| 1049 | int RdmaEndpoint::DoPostRecv(void* block, size_t block_size) { |
| 1050 | ibv_recv_wr wr; |
| 1051 | memset(&wr, 0, sizeof(wr)); |
| 1052 | ibv_sge sge; |
| 1053 | sge.addr = (uint64_t)block; |
| 1054 | sge.length = block_size; |
| 1055 | sge.lkey = GetRegionId(block); |
| 1056 | wr.num_sge = 1; |
| 1057 | wr.sg_list = &sge; |
| 1058 | |
| 1059 | ibv_recv_wr* bad = NULL; |
| 1060 | int err = ibv_post_recv(_resource->qp, &wr, &bad); |
| 1061 | if (err != 0) { |
| 1062 | LOG(WARNING) << "Fail to ibv_post_recv: " << berror(err); |
| 1063 | return -1; |
| 1064 | } |
| 1065 | return 0; |
| 1066 | } |
| 1067 | |
| 1068 | int RdmaEndpoint::PostRecv(uint32_t num, bool zerocopy) { |
| 1069 | // We do the post repeatedly from the _rbuf[_rq_received]. |
nothing calls this directly
no test coverage detected