//结构体ibv_send_wr描述struct ibv_send_wr { uint64_t wr_id; struct ibv_send_wr *next; struct ibv_sge *sg_list; int num_sge; enum ibv_wr_opcode opcode; unsigned int send_flags; /* When opcode is *_WITH_IMM: Immediate data in network byte order. * When opcode is *_INV: Stor...
* When opcode is *_INV: Stores the rkey to invalidate */ union { __be32 imm_data; uint32_t invalidate_rkey; }; union { struct { uint64_t remote_addr; uint32_t rkey; } rdma; struct { uint64_t remote_addr; uint64_t compare_add; uint64_t swap; uint32_t rkey; } atomic; ...
voidNetwork::PostWrite(RdmaWriteOp&&write,std::function<void(Network&,RdmaOp&)>&&callback){auto*op=newRdmaOp{.type=RdmaOpType::kWrite,.write=std::move(write),.callback=std::move(callback),};structioveciov={.iov_base=(uint8_t*)write.buf->data+write.offset,.iov_len=write.len,};str...
brpc-RDMA为了提升传输性能的同时适用于实际生产环境做了四点优化:在brpc中采用了双边的RDMA操作(SEND/RECV)简化确认机制,并使用了IOBuf的内存分配功能,brpc-RDMA用户可以无需了解内存管理。[1]为了进行流量控制,brpc-RDMA将接收方的可用接收数传递给发送方,这个信息可以放置imm_data中,也可以作为一个单独的请求。brpc...
uint32_t imm_data; /* in network byte order */ union { struct { uint64_t remote_addr; uint32_t rkey; } rdma; struct { uint64_t remote_addr; uint64_t compare_add; uint64_t swap; uint32_t rkey; } atomic; struct { struct ibv_ah *ah; ...
/When opcode is *_WITH_IMM: Immediate data in network byte order. When opcode is *_INV: Stores the rkey to invalidate */ union { __be32 imm_data; uint32_t invalidate_rkey; }; union { struct { uint64_t remote_addr; uint32_t rkey; ...
// Verbs复杂数据结构示意,无需关注细节struct ibv_send_wr { uint64_t wr_id; struct ibv_send_wr *next; struct ibv_sge *sg_list; int num_sge; enum ibv_wr_opcode opcode; enum ibv_send_flags send_flags; uint32_t imm_data;/* network byte order */ union {...
process_pending_data:检查pending的connection,并调用read_handler读取connection中的数据。 ae_handler:该方法有三个处理流程,第一是处理RDMA CQ事件,包括接收处理RedisRdmaCmd控制面消息,接收RDMA IMM类事件增加rx.offset;第二是调用read_handler和write_handler,这部分是与tcp、tls流程一致;第三是检查rx.pos和rx.off...
process_pending_data:检查pending的connection,并调用read_handler读取connection中的数据。 ae_handler:该方法有三个处理流程,第一是处理RDMA CQ事件,包括接收处理RedisRdmaCmd控制面消息,接收RDMA IMM类事件增加rx.offset;第二是调用read_handler和write_handler,这部分是与tcp、tls流程一致;第三是检查rx.pos和rx.off...
uint32_t imm_data; /* in network byte order */ union { struct { uint64_t remote_addr; uint32_t rkey; } rdma; struct { uint64_t remote_addr; uint64_t compare_add; uint64_t swap; uint32_t rkey; } atomic; struct { struct ibv_ah *ah; ...