DPDK Ring Ports¶
Warning
DPDK ring interfaces cannot be used for guest communication and are retained mainly for backwards compatibility purposes. In nearly all cases, vhost-user ports are a better choice and should be used instead.
The DPDK datapath provides DPDK-backed ring ports that are implemented using
DPDK’s librte_ring
library. For more information on this library, refer to
the DPDK documentation.
Quick Example¶
This example demonstrates how to add a dpdkr
port to an existing bridge
called br0
:
$ ovs-vsctl add-port br0 dpdkr0 -- set Interface dpdkr0 type=dpdkr
dpdkr¶
To use ring ports, you must first add said ports to the switch. Unlike
vhost-user ports, ring port names must take a specific
format, dpdkrNN
, where NN
is the port ID. For example:
$ ovs-vsctl add-port br0 dpdkr0 -- set Interface dpdkr0 type=dpdkr
Once the port has been added to the switch, they can be used by host processes.
A sample loopback application - test-dpdkr
- is included with Open vSwitch.
To use this, run the following:
$ ./tests/test-dpdkr -c 1 -n 4 --proc-type=secondary -- -n 0
Further functionality would require developing your own application. Refer to the DPDK documentation for more information on how to do this.
Adding dpdkr ports to the guest¶
It is not recommended to use ring ports from guests. Historically, this was possible using a patched version of QEMU and the IVSHMEM feature provided with DPDK. However, this functionality was removed because:
- The IVSHMEM library was removed from DPDK in DPDK 16.11
- Support for IVSHMEM was never upstreamed to QEMU and has been publicly rejected by the QEMU community
- vhost-user interfaces are the defacto DPDK-based path to guests