Mellanox cx4 驱动总结

以下要点总结了基本的以太网驱动程序流程:

驱动加载

  1. 通过命令 QUERY_HCA_CAP 检查以太网卸载支持的设备功能
  2. 建立发送rings: 分配中断,创建Event Queues 和 Completion Queues,通常每个cpu core上创建一个 中断,一个事件队列,一个完成队列。 创建Transport Interface Send (TIS) objects,通常每个优先级创建一个TIS. 创建Send Queues (SQ) objects 用于发包并于TIS关联,通常每个cpu上的每个优先级都会创建发送队列,注意:SQs 和CQs 的关系是多对一的。
  3. 创建接收rings:分配中断,创建事件队列和完成队列,通常每个cpu core上都对应又一个事件队列和完成队列以及中断。创建用于接收数据包的receive queues(RQ) 并关联到TIR上, 通常每个cpu都会创建接收队列。 创建Transport Interface Receive (TIR) 结构,关联TIR结构给对应的RQ结构体。
  4. flow table: 配置流表到对应的TIR结构。

发送数据路径

•Post send Work Request on the TX Work Queue buffer and ring doorbell.
•Buffers can be released when CQE is reported.
•Interrupt and event reporting can be controlled through the CQ and the EQ.

接收数据路径

•Post receive Work Request on the RX Work Queue buffer and ring doorbell.
•Reported CQEs indicate incoming packets including stateless offload indications.
•Interrupt and event reporting can be controlled through the CQ and the EQ.

卸载驱动

删除流表,删除接收rings,然后删除发送rings

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值