19. KNI Poll Mode Driver

This PMD enables using KNI without having a KNI specific application,
any forwarding application can use PMD interface for KNI.

Sending packets to any DPDK controlled interface or sending to the
Linux networking stack will be transparent to the DPDK application.

To create a KNI device net_kni# device name should be used, and this
will create kni# Linux virtual network interface.

There is no physical device backend for the virtual KNI device.

Packets sent to the KNI Linux interface will be received by the DPDK
application, and DPDK application may forward packets to a physical NIC
or to a virtual device (like another KNI interface or PCAP interface).

To forward any traffic from physical NIC to the Linux networking stack,
an application should control a physical port and create one virtual KNI port,
and forward between two.

Using this PMD requires KNI kernel module be inserted.

19.1. Usage

EAL --vdev argument can be used to create KNI device instance, like:

testpmd --vdev=net_kni0 --vdev=net_kn1 -- -i

Above command will create kni0 and kni1 Linux network interfaces,
those interfaces can be controlled by standard Linux tools.

When testpmd forwarding starts, any packets sent to kni0 interface
forwarded to the kni1 interface and vice versa.

There is no hard limit on number of interfaces that can be created.

19.2. Default interface configuration

librte_kni can create Linux network interfaces with different features,
feature set controlled by a configuration struct, and KNI PMD uses a fixed
configuration: