drivers/net: set close behaviour flag at probing
authorThomas Monjalon <thomas@monjalon.net>
Sun, 11 Nov 2018 22:46:11 +0000 (23:46 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Nov 2018 23:35:53 +0000 (00:35 +0100)
commit15febafdd43fd300c7178f95e79013d3a81e8967
tree2332ab68a467a8ba3014196b5e447e8305e491b6
parentf3698c3d09a69ea398a1c5c3c01083a84ee173b0
drivers/net: set close behaviour flag at probing

The ethdev flag RTE_ETH_DEV_CLOSE_REMOVE is set for drivers
having migrated to the new behaviour of rte_eth_dev_close().

As any other flag, it can be useful to know about its value
as soon as the port is probed.
Unfortunately, it was set inside the close operation,
just before being erased by memset() in rte_eth_dev_release_port().
The flag assignment is moved to the probing stage, so it can
be checked by the application in order to anticipate the behaviour.

Fixes: 42603bbdb58e ("net/mlx5: release port on close")
Fixes: 6c99085d972b ("net/vmxnet3: fix hot-unplug")
Fixes: 4d7877fde2ef ("net/ena: remove resources when port is being closed")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/ena/ena_ethdev.c
drivers/net/mlx5/mlx5.c
drivers/net/vmxnet3/vmxnet3_ethdev.c