RDMA的ibv_post_send() 函数
函数原型为
int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr,
struct ibv_send_wr **bad_wr);
其中struct 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;
int send_flags;
uint32_t imm_data;
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;
uint32_t remote_qpn;
uint32_t remote_qkey;
} ud;
} wr;
};
在ibv_send_wr 结构体中opcode参数决定了数据传输类型,比如说:
IBV_WR_SEND——在这种类型中,The content of the local memory buffers specified in sg_list is being sent to the remote QP. The sender doesn’t know where the data will be written in the remote node. A Receive Request will be consumed from the head of remote QP's Receive Queue and sent data will be written to the memory buffers which are specified in that Receive Request.当前内存buffer中在sg_list中的内容会被发送给远方的QP。发送方并不会知道数据会写到远方节点的何处。接收方要post_recv,并且接收到的数据要放到指定的地址中。
IBV_WR_RDMA_WRITE——在这种类型中,The content of the local memory buffers specified in sg_list is being sent and written to a contiguous block of memory range in the remote QP's virtual space. This doesn't necessarily means that the remote memory is physically contiguous. No Receive Request will be consumed in the remote QP.本地内存buffer中sg_list中的内容会被发送和写到远方节点的QP的虚拟空间中的一段连续内存块中——这并不意味着远方的内存在物理上也是连续的。并且remote QP也不需要post_recv。
RDMA的ibv_post_send() 函数的更多相关文章
- [SPDK/NVMe存储技术分析]012 - 用户态ibv_post_send()源码分析
OFA定义了一组标准的Verbs,并提供了一个标准库libibvers.在用户态实现NVMe over RDMA的Host(i.e. Initiator)和Target, 少不了要跟OFA定义的Ver ...
- mellanox RDMA RoCE
一:首先根据系统发行版本下载对应的驱动,下载地址如下: http://www.mellanox.com/page/products_dyn?product_family=26&mtag=lin ...
- 第3阶段——内核启动分析之创建si工程和分析stext启动内核函数(4)
目标: (1)创建Source Insight 工程,方便后面分析如何启动内核的 (2)分析uboot传递参数,链接脚本如何进入stext的 (3) 分析stext函数如何启动内核: (3.1) ...
- ibv_get_device_name()函数
const char *ibv_get_device_name(struct ibv_device *device); 描述 函数用来获取一个与RDMA设备相关联的名字 注意 这个名字在一台特定的机器 ...
- ibv_open_device()函数
struct ibv_context *ibv_open_device(struct ibv_device *device); 描述 函数会创建一个RDMA设备相关的context:可以通过ibv_c ...
- ibv_get_device_guid()函数
uint64_t ibv_get_device_guid(struct ibv_device *device); 描述 函数返回RDMA 设备的 GUID(The Global Unique IDen ...
- Buffer Data RDMA 零拷贝 直接内存访问
waylau/netty-4-user-guide: Chinese translation of Netty 4.x User Guide. 中文翻译<Netty 4.x 用户指南> h ...
- ibv_close_device()函数
int ibv_close_device(struct ibv_context *context); 描述 函数用来关闭一个RDMA设备context: 注意: 函数不能用来释放与该Context关联 ...
- ibv_free_device_list()函数
void ibv_free_device_list(struct ibv_device **list); 描述 函数用来释放当前可用的RDMA设备数组. 注意 数组一旦释放,指向设备的指针将不能再由i ...
随机推荐
- 禁用链接 <a>
pointer-events Syntax /* Keyword values */ pointer-events: auto; pointer-events: none; pointer-event ...
- Centos6.7安装docker1.7.1
Docker当前发布的最新版本已经到了1.11,其官网上针对Centos的的安装需求如下: Docker requires a -bit installation regardless of your ...
- Animation小问题整理
1.在动画播放中改变层级内容的名字,不会造成动画内容映射的改变. 2.Animator动画剪辑层级没问题,但是不播放 检查是否Mask损坏,FBX文件的Animations选项下面有个Mask.Uni ...
- Hadoop安装指引
pre.ctl { font-family: "Liberation Mono", monospace } p { margin-bottom: 0.25cm; line-heig ...
- iOS- iPhone App 如何运营?
在质量过硬的情况下,如何运营才能使APP冲上app store的推荐?如何获得公众认可?获得下载量? 睡前简单分享一下最近从书中.互联网中浏览到的一些信息,和自己的一点理解. 首先这个问题很大.就抛砖 ...
- PHP下拉框内容随单选框内容变化
这久在修改一个项目的小东西,要求把下拉框改为单选框,由于代码封闭,修改不了获取函数,所以想了个办法让下拉框的内容随单选框的内容变化,下面把代码分享给大家: <!DOCTYPE html PUBL ...
- Point ZM 转换为Point 类型
打开ArcToolbox,使用ConvertionTools-> To Shapefile->FeatureClass to Shapefile 工具,注意在环境设置里,里将output ...
- Java面向对象三大特点之封装
封装 含义:将对象的属性和行为封装起来,而将对象的属性和行为封装起来的载体是类,类通常对客户隐藏其实现细节,这就是封装的思想.封装最主要的功能在于我们能修改自己的实现代码,而不用修改那些调用我们代码的 ...
- sizeof既是关键字,又是运算符(操作符),但不是函数!
sizeof是关键字吗 sizeof是关键字,这一点毋庸置疑.你不能将sizeof定义为任何标识符.查看C语言标准文档里的说明: sizeof是运算符(操作符)吗 C语言中,sizeof是运算符(操作 ...
- SpringMVC报错The request sent by the client was syntactically incorrect ()
springmvc数据绑定出的错 在数据绑定的时候一定要主意Controller方法中的参数名和jsp页面里的参数名字是否一致或者按照绑定的规范来写, 如果不一致,可能回报如下错误: The requ ...