pjk*_*pjk 10 cpu dpdk ebpf xdp-bpf
我确实有一些 DPDK 经验,但目前我正在阅读许多有关 XDP 的博客。我正在尝试比较这两种技术并了解 DPDK 和 XDP 之间的差异。这引发了一些问题。我希望有人能帮助我解决以下问题:
预先感谢您的帮助!
Vip*_*ese 13
With DPDK I can map workers to CPU cores and isolate CPU cores which will be used by DPDK. In case of eBPF / XDP, which CPU cores are used?
答案:带有 eBPF 的 XDP 运行在内核空间,与 DPDK 用户空间不同。
Are all available CPU cores used?
答:是的,但通常 irqbalance 或中断锁定会将端口的 RX 队列放到特定的内核上。
Would it be possible to isolate CPU cores meant for eBPF / XDP programs?
答:您指的是KERNEL_CMD_LINE选项isol,理解不正确。如上所述,您可以固定 RX 队列的中断,强制在该内核上运行 eBPF XDP。
When I test the throughput from a DPDK application, I'm able to check whether ring buffers (mempools) are full so packets will be lost. But how can I check whether an eBPF / XDP program causes packet drops because the throughput is too high?
答案:您可以混合使用 NIC 和 eBPF 计数器来实现相同的效果
I assume when an eBPF / XDP program takes too much time to process a packet, eventually, you will see packet drops? (especially when sending 64B packets on a high rate to find the maximum number of packets that can be send)
答:不一定正确,XDP 的最佳性能是为用户提供零拷贝驱动程序。在单独的内核上运行应用程序线程可提供与 DPDK 几乎相当的性能(使用 2 * 10Gbps - DPDK 性能的 95% 进行测试)。