LLC/CDC消息通信机制
由于LLC/CDC消息性能要求低,所以采用的是SEND/RECV机制
WR_TX
int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv)
{
ib_req_notify_cq(link->smcibdev->roce_cq_send, IB_CQ_NEXT_COMP |IB_CQ_REPORT_MISSED_EVENTS);
--->>>通知硬件,使用roce_cq_send进行完成事件的回调
ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx], NULL);
--->>>使用对应的qp,发送wr中对应id的消息
}
硬件将rocev2报文发送,接收到对端回的ack报文后,会产生MSIX中断,网卡驱动执行comp_handler回调函数,对应wr_tx就是smc_wr_tx_cq_handler函数
void smc_wr_tx_cq_handler(struct ib_cq *ib_cq, void *cq_context)
{
tasklet_schedule(&dev->send_tasklet);
--->>>启动send的tasklet
}
static void smc_wr_tx_tasklet_fn(unsigned