我正在尝试使用RDMA Aware Programming User Manual附录 D 中描述的跨通道通信支持。不幸的是,我对某些函数参数的含义有些困惑。
我的问题
ibv_exp_post_send()
和函数分别采用工作请求结构的ibv_exp_post_task()
链表和工作请求结构的集合*。该结构中的 cq_count 和 wqe_count 是什么意思?
struct ibv_exp_send_wr {
// ...
union {
// ...
struct {
struct ibv_cq *cq; /* Completion queue (CQ) that WAIT WR relates to */
int32_t cq_count; /* Producer index (PI) of the CQ */
} cqe_wait; /* Describes IBV_EXP_WR_CQE_WAIT WR */
struct {
struct ibv_qp *qp; /* Queue pair (QP) that SEND_EN/RECV_EN WR relates to */
int32_t wqe_count; /* Producer index (PI) of the QP */
} wqe_enable; /* Desribes IBV_EXP_WR_RECV_ENABLE and IBV_EXP_WR_SEND_ENABLE WR */
} task;
// ...
};
第一个工作请求/完成是否总是编号为 1,随后的工作请求/完成是线性增加的?还是有时会重置,例如在 ibv_exp_post_task() 调用之间或在处理某些请求后减少?ibv_exp_post_send 或 ibv_exp_post_task 之间的数字是否一致?
*从技术上讲,一个指向任务链表的指针,每个任务都包含一个工作请求的链表。