[ovs-dev] [patch_v2] dpdk: Fix device cleanup.
Aaron Conole
aconole at redhat.com
Sun Jul 30 15:19:23 UTC 2017
Darrell Ball <dlu998 at gmail.com> writes:
> Commit 5dcde09c80a8 was introduced to make detaching more
> automatic without using an additional command beyond
> ovs-vsctl del-port <br> <port>.
>
> Sometimes, since commit 5dcde09c80a8, dpdk devices are
> not detached when del-port is issued; command example:
>
> sudo ovs-vsctl del-port br0 dpdk1
>
> This can happen when vswitchd is (re)started with an existing
> database and devices are already bound to dpdk.
>
> A minimal recipe to reproduce the issue is:
>
> 1/ Starting with
>
> darrell at prmh-nsx-perf-server125:~$ sudo ovs-vsctl show
> 1c50d8ee-b17f-4fac-a595-03b0da8c8275
> Bridge "br0"
> Port "br0"
> Interface "br0"
> type: internal
> Port "dpdk1"
> Interface "dpdk1"
> type: dpdk
> options: {dpdk-devargs="0000:04:00.1"}
> Port "dpdk0"
> Interface "dpdk0"
> type: dpdk
> options: {dpdk-devargs="0000:04:00.0"}
>
> darrell at prmh-nsx-perf-server125:~$ /usr/src/dpdk-16.11/tools/dpdk-devbind.py --status
>
> Network devices using DPDK-compatible driver
> ============================================
> 0000:04:00.0 'Ethernet Controller 10-Gigabit X540-AT2' drv=uio_pci_generic unused=ixgbe,vfio-pci
> 0000:04:00.1 'Ethernet Controller 10-Gigabit X540-AT2' drv=uio_pci_generic unused=ixgbe,vfio-pci
>
> 2/ restart vswitchd
>
> 3/ run
> sudo ovs-vsctl del-port br0 dpdk1
>
> and find the interface is NOT detached; there is
> no info log ‘Device '0000:04:00.1' detached’.
>
> A more verbose discussion is here:
> https://mail.openvswitch.org/pipermail/ovs-dev/2017-June/333462.html
> along with another possible solution.
>
> Since we are nearing the end of a release, a safe approach is needed,
> at this time.
> One approach is to revert 5dcde09c80a8. This patch does not do that
> but reinstates the command ovs-appctl netdev-dpdk/detach to handle
> cases when del-port will not work.
>
> To detach the device, run the reinstated command
> ovs-appctl netdev-dpdk/detach 0000:04:00.1
> Observe console output
> ‘Device '0000:04:00.1' has been detached’
>
> Fixes: 5dcde09c80a8 ("netdev-dpdk: Fix device leak on port deletion.")
> CC: Ilya Maximets <i.maximets at samsung.com>
> Acked-by: Fischetti, Antonio <antonio.fischetti at intel.com>
> Signed-off-by: Darrell Ball <dlu998 at gmail.com>
> ---
LGTM.
Acked-by: Aaron Conole <aconole at redhat.com>
More information about the dev
mailing list