DPDK中的vmxnet3 PMD中的command、data和comp ring是什么

What are command, data and comp ring in vmxnet3 PMD in DPDK

我开始工作并了解 DPDK 的基础知识,它与 VMWare (VMXNET3 PMD) 一起工作。我开始浏览代码库并在 vmxnet3_tx_queue_t(在 vmxnet3_ring.h)中找到了对 3 个环结构的引用,即 cmd_ring、data_ring 和 comp_ring。

我试着上网了解用例和它们的工作原理,但没有完全理解它的文档或无法理解。

任何指示/方向都会有很大帮助。

vmxnet3 在 DPDK NIC 文档中有相当恰当的描述: http://doc.dpdk.org/guides/nics/vmxnet3.html

The driver pre-allocates the packet buffers and loads the command ring descriptors in advance. The hypervisor fills those packet buffers on packet arrival and write completion ring descriptors, which are eventually pulled by the PMD. After reception, the DPDK application frees the descriptors and loads new packet buffers for the coming packets.

In the transmit routine, the DPDK application fills packet buffer pointers in the descriptors of the command ring and notifies the hypervisor. In response the hypervisor takes packets and passes them to the vSwitch, It writes into the completion descriptors ring. The rings are read by the PMD in the next transmit routine call and the buffers and descriptors are freed from memory.

不确定这些细节是否是“DPDK 的基础知识”,因为那些低级队列由 DPDK 轮询模式驱动程序抽象API:

https://doc.dpdk.org/guides/prog_guide/poll_mode_drv.html

因此您最好参考此文档并使用此 API,因为无论如何您都无法直接在您的应用程序中使用 vmxnet3 铃声...