numam-dpdk/drivers/net/bnx2x
Thomas Monjalon fbd1913561 ethdev: remove old close behaviour
The temporary flag RTE_ETH_DEV_CLOSE_REMOVE is removed.
It was introduced in DPDK 18.11 in order to give time for PMDs to migrate.

The old behaviour was to free only queues when closing a port.
The new behaviour is calling rte_eth_dev_release_port() which does
three more tasks:
	- trigger event callback
	- reset state and few pointers
	- free all generic port resources

The private port resources must be released in the .dev_close callback.

The .remove callback should:
	- call .dev_close callback
	- call rte_eth_dev_release_port()
	- free multi-port device shared resources

Despite waiting two years, some drivers have not migrated,
so they may hit issues with the incompatible new behaviour.
After sending emails, adding logs, and announcing the deprecation,
the only last solution is to declare these drivers as unmaintained:
	ionic, liquidio, nfp
Below is a summary of what to implement in those drivers.

* The freeing of private port resources must be moved
from the ".remove(device)" function to the ".dev_close(port)" function.

* If a generic resource (.mac_addrs or .hash_mac_addrs) cannot be freed,
it must be set to NULL in ".dev_close" function to protect from
subsequent rte_eth_dev_release_port() freeing.

* Note 1:
The generic resources are freed in rte_eth_dev_release_port(),
after ".dev_close" is called in rte_eth_dev_close(), but not when
calling ".dev_close" directly from the ".remove" PMD function.
That's why rte_eth_dev_release_port() must still be called explicitly
from ".remove(device)" after calling the ".dev_close" PMD function.

* Note 2:
If a device can have multiple ports, the common resources must be freed
only in the ".remove(device)" function.

* Note 3:
The port is supposed to be in a stopped state when it is closed.
If it is not the case, it is free to the PMD implementation
how to react when trying to close a non-stopped port:
either try to stop it automatically or just return an error.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2020-09-30 19:19:14 +02:00
..
bnx2x_ethdev.c ethdev: remove old close behaviour 2020-09-30 19:19:14 +02:00
bnx2x_ethdev.h net/bnx2x: remove local bool type 2020-01-17 19:46:02 +01:00
bnx2x_logs.h net/bnx2x: fix dynamic logging 2018-11-14 00:35:53 +01:00
bnx2x_osal.h net/bnx2x: fix meson build 2019-11-06 11:55:24 +01:00
bnx2x_rxtx.c net/bnx2x: add Rx descriptor MTU segment limitation 2020-05-11 22:27:39 +02:00
bnx2x_rxtx.h net/bnx2x: fix DMAE timeout 2019-04-19 14:51:54 +02:00
bnx2x_stats.c net/bnx2x: fix logging to include device name 2018-10-11 18:53:48 +02:00
bnx2x_stats.h net/bnx2x: move SPDX tags to source files 2018-08-03 17:08:39 +02:00
bnx2x_vfpf.c net/bnx2x: add multicast MAC address filtering 2020-04-21 13:57:07 +02:00
bnx2x_vfpf.h net/bnx2x: add multicast MAC address filtering 2020-04-21 13:57:07 +02:00
bnx2x.c net/bnx2x: use common bit operations API 2020-06-16 14:34:42 +02:00
bnx2x.h net/bnx2x: use common bit operations API 2020-06-16 14:34:42 +02:00
ecore_fw_defs.h net/bnx2x: update to latest FW 7.13.11 2019-10-08 12:14:31 +02:00
ecore_hsi.h net/bnx2x: update to latest FW 7.13.11 2019-10-08 12:14:31 +02:00
ecore_init_ops.h net/bnx2x: update to latest FW 7.13.11 2019-10-08 12:14:31 +02:00
ecore_init.h net/bnx2x: update to latest FW 7.13.11 2019-10-08 12:14:31 +02:00
ecore_mfw_req.h net/bnx2x: update to latest FW 7.13.11 2019-10-08 12:14:31 +02:00
ecore_reg.h net/bnx2x: update and reorganize HW registers 2019-10-08 12:14:31 +02:00
ecore_sp.c net/bnx2x: use common bit operations API 2020-06-16 14:34:42 +02:00
ecore_sp.h net/bnx2x: use common bit operations API 2020-06-16 14:34:42 +02:00
elink.c net/bnx2x: fix icc build 2019-06-26 09:14:24 +02:00
elink.h drivers/net: fix shifting 32-bit signed variable 31 times 2019-03-01 18:17:36 +01:00
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
rte_pmd_bnx2x_version.map version: 20.11-rc0 2020-08-12 11:32:16 +02:00