'How to add veth interfaces in dpdk

I need to create a veth device for the slowpath for control packets.

What I tried till now: I have created veth interfaces using below command

sudo ip link add veth1-2 type veth peer name veth2-1

when I use command sudo dpdk-devbind.py --bind=igb_uio veth1-2 to add veth into dpdk.

It gives me an error that "Unknown device: veth2-1

Is there any way we can add veth interfaces in dpdk ?



Solution 1:[1]

If you want a "dpdk-solution", then what you'll want to look at is KNI: https://doc.dpdk.org/guides/prog_guide/kernel_nic_interface.html

From their docs: The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.

The benefits of using the DPDK KNI are:

  • Faster than existing Linux TUN/TAP interfaces (by eliminating system calls and copy_to_user()/copy_from_user() operations.

  • Allows management of DPDK ports using standard Linux net tools such as ethtool, ifconfig and tcpdump.

  • Allows an interface with the kernel network stack.

If your fine using a non-dpdk solution, then a TUN/TAP device is a typical way to interface with the networking stack. Your application would receive packets on the dpdk-controlled nic, and if it is a control packet you would simply forward it on to the TUN/TAP device (or KNI if using DPDK's version of TUN/TAP). Similarly for the other direction, if the TUN/TAP/KNI device receives a packet from the networking stack, you would simply send it out the DPDK physical nic.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gabe