简体   繁体   中英

How is the data in TX/RX buffer of NIC is transferred to dpdk ring buffer rather than kernel ring buffer?

I wanted to know how dpdk bypasses kernel. How does userspace application access the NIC space. What tool does dpdk use to access the NIC? I know, dpdk uses uio_pci_generic or igb_uio or vfio-pci drivers. How does this attach to NIC space. How does poll mode driver know where to poll?

I know that the RX of NIC is redirected to dpdk ring buffer instead of kernel ring buffer.

dpdk uses uio_pci_generic or igb_uio or vfio-pci

That is exactly how DPDK attaches to the NIC - by binding the DPDK-compatible drivers to NIC PCI address (in most cases, for example with Mellanox, RDMA is used). Well, actually, it's you who has to bind the drivers .

DPDK then, as you said, maps the NIC buffers to userspace memory (hugepages) and interfaces with the NIC over PCI, directly "talking" to registers.

If you want to know more in-depth about the architecture, these slides do a pretty good job I think.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM