numam-dpdk/drivers/net/softnic
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
..
conn.c mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
conn.h net/softnic: add connection agent 2018-07-12 13:52:37 +02:00
firmware.cli net/softnic: add firmware script 2018-07-12 13:55:42 +02:00
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
parser.c net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
parser.h net: add rte prefix to ether structures 2019-05-24 13:34:45 +02:00
rte_eth_softnic_action.c net/softnic: add symmetric crypto action 2018-10-26 14:13:45 +02:00
rte_eth_softnic_cli.c replace packed attributes 2020-04-16 18:16:46 +02:00
rte_eth_softnic_cryptodev.c net/softnic: use separate session mempools 2019-01-10 16:57:22 +01:00
rte_eth_softnic_flow.c net: add rte prefix to ether functions 2019-05-24 13:34:45 +02:00
rte_eth_softnic_internals.h net/softnic: add config flexibility to TM 2019-07-22 15:41:50 +02:00
rte_eth_softnic_link.c net/softnic: check status of getting ethdev info 2019-10-07 14:45:35 +02:00
rte_eth_softnic_mempool.c net/softnic: add mempool object 2018-07-12 13:49:44 +02:00
rte_eth_softnic_meter.c meter: replace color definitions 2019-04-11 14:27:32 +02:00
rte_eth_softnic_pipeline.c net: add rte prefix to TCP structure 2019-05-24 13:34:46 +02:00
rte_eth_softnic_swq.c net/softnic: fix memory illegal access after free 2018-07-23 23:55:26 +02:00
rte_eth_softnic_tap.c replace snprintf with strlcpy without adding extra include 2019-04-04 22:45:54 +02:00
rte_eth_softnic_thread.c net/softnic: fix resource leak for pipeline 2020-05-05 15:54:26 +02:00
rte_eth_softnic_tm.c ethdev: support TM for shaper config in packet mode 2020-09-18 18:55:10 +02:00
rte_eth_softnic.c ethdev: remove old close behaviour 2020-09-30 19:19:14 +02:00
rte_eth_softnic.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_pmd_softnic_version.map version: 20.11-rc0 2020-08-12 11:32:16 +02:00