net/vmxnet3: fix hot-unplug
authorLuca Boccassi <bluca@debian.org>
Wed, 31 Oct 2018 18:39:44 +0000 (18:39 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 2 Nov 2018 09:50:16 +0000 (10:50 +0100)
commit6c99085d972b5f0fddf9f986ea8907ed5dafd086
tree9f32c780dfe2b9aa5f8db2079605136a128dea8a
parentf9b0d1902caf893493b5e07763ecf817c34fc75c
net/vmxnet3: fix hot-unplug

The vmxnet3 driver can't call back into dev_close(), and possibly
dev_stop(), in dev_uninit().  When dev_uninit() is called, anything
that those routines would want to clean up has already been released.
Further, for complete cleanup, it is necessary to release any of the
queue resources during dev_close().
This allows a vmxnet3 device to be hot-unplugged without leaking
queues.
Also set RTE_ETH_DEV_CLOSE_REMOVE on close so that the port resources
can be deallocated.
Return EBUSY if remove is called before stop.

Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")
Cc: stable@dpdk.org
Signed-off-by: Brian Russell <brussell@brocade.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
drivers/net/vmxnet3/vmxnet3_ethdev.c