summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2017-05-19 16:37:31 +0300
committerBen Pfaff <blp@ovn.org>2017-05-31 16:20:49 -0700
commit5dcde09c80a816cdd9a36740abf9b94688e694a8 (patch)
treeed000ff7aa2aa18792f9a9d80ef3b8bfabe615a6 /Documentation
parent03d6399e618e4136c5da0be2b6f18f0b7d75b2bb (diff)
downloadopenvswitch-5dcde09c80a816cdd9a36740abf9b94688e694a8.tar.gz
netdev-dpdk: Fix device leak on port deletion.
Currently, once created device in dpdk will exist forever even after del-port operation untill we manually call 'ovs-appctl netdev-dpdk/detach <name>', where <name> is not the port's name but the name of dpdk eth device or pci address. Few issues with current implementation: 1. Different API for usual (system) and DPDK devices. (We have to call 'ovs-appctl netdev-dpdk/detach' each time after 'del-port' to actually free the device) This is a big issue mostly for virtual DPDK devices. 2. Follows from 1: For DPDK devices 'del-port' leads just to 'rte_eth_dev_stop' and subsequent 'add-port' will just start the already existing device. Such behaviour will not reset the device to initial state as it could be expected. For example: virtual pcap pmd will continue reading input file instead of reading it from the beginning. 3. Follows from 2: After execution of the following commands 'port1' will be configured with the 'old-options' while 'ovs-vsctl show' will show us 'new-options' in dpdk-devargs field: ovs-vsctl add-port port1 -- set interface port1 type=dpdk \ options:dpdk-devargs=<eth_pmd_name1>,<old-options> ovs-vsctl del-port port1 ovs-vsctl add-port port1 -- set interface port1 type=dpdk \ options:dpdk-devargs=<eth_pmd_name1>,<new-options> 4. Follows from 1: Not detached device consumes 'port_id'. Since we have very limited number of 'port_id's (32 in common case) this may lead to quick exhausting of id pool and inability to add any other port. To avoid above issues we need to detach all the attached devices on port destruction. appctl 'netdev-dpdk/detach' removed because not needed anymore. We need to use internal 'attached' variable to track ports on which rte_eth_dev_attach() was called and returned successfully to avoid closing and detaching devices that do not support hotplug or by any other reason attached using the 'dpdk-extra' cmdline options. CC: Ciara Loftus <ciara.loftus@intel.com> Fixes: 55e075e65ef9 ("netdev-dpdk: Arbitrary 'dpdk' port naming") Fixes: 69876ed78611 ("netdev-dpdk: Add support for virtual DPDK PMDs (vdevs)") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Billy O'Mahony <billy.o.mahony@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/howto/dpdk.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index 3bd9e0760..7c06239d3 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -342,10 +342,9 @@ Then it can be attached to OVS::
$ ovs-vsctl add-port br0 dpdkx -- set Interface dpdkx type=dpdk \
options:dpdk-devargs=0000:01:00.0
-It is also possible to detach a port from ovs, the user has to remove the
-port using the del-port command, then it can be detached using::
+Detaching will be performed while processing del-port command::
- $ ovs-appctl netdev-dpdk/detach 0000:01:00.0
+ $ ovs-vsctl del-port dpdkx
This feature is not supported with VFIO and does not work with some NICs.
For more information please refer to the `DPDK Port Hotplug Framework