numam-dpdk/doc/guides
Thomas Monjalon 23ea57a2a0 ethdev: complete closing of port
After closing a port, it cannot be restarted.
So there is no reason to not free all associated resources.

The last step was done with rte_eth_dev_detach() which is deprecated.
Instead of blindly removing the associated rte_device, the driver should
check if no more port (ethdev, cryptodev, etc) is open for the device.

The last ethdev freeing which were done by rte_eth_dev_detach(),
are now done at the end of rte_eth_dev_close() if the driver supports
the flag RTE_ETH_DEV_CLOSE_REMOVE.
There will be a transition period for PMDs to enable this new flag
and migrate to the new behaviour.
When enabling RTE_ETH_DEV_CLOSE_REMOVE, the PMD must free all its
private resources for the port, in its dev_close function.
It is advised to call the dev_close function in the remove function
in order to support removing a device without closing its ports.

Some drivers does not allocate MAC addresses dynamically or separately.
In those cases, the pointer is set to NULL, in order to avoid wrongly
freeing them in rte_eth_dev_release_port().

A closed port will have the state RTE_ETH_DEV_UNUSED which is
considered as invalid by rte_eth_dev_is_valid_port().
So validity is not checked anymore for closed ports in testpmd.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-26 22:14:05 +02:00
..
bbdevs baseband/turbo_sw: update for FlexRAN 1.6.0 2018-07-25 08:22:14 +02:00
compressdevs use registered name for OCTEON TX references 2018-10-26 14:16:05 +02:00
contributing drivers/net: fix log type string 2018-10-11 18:53:49 +02:00
cryptodevs doc: add CAAM JR guide 2018-10-17 12:23:40 +02:00
eventdevs doc: fix spelling in PMD guides 2018-10-26 22:14:05 +02:00
faq doc: update preferred log level syntax in guides 2018-04-25 12:16:50 +02:00
freebsd_gsg doc: update memory option usage for FreeBSD 2018-04-28 00:07:31 +02:00
howto doc: fix typos in the flow API guide 2018-10-11 18:53:49 +02:00
linux_gsg eal: add option to limit memory allocation on sockets 2018-07-13 11:44:15 +02:00
mempool use registered name for OCTEON TX references 2018-10-26 14:16:05 +02:00
nics doc: fix spelling in PMD guides 2018-10-26 22:14:05 +02:00
platform use registered name for OCTEON TX references 2018-10-26 14:16:05 +02:00
prog_guide kni: set default carrier state of interface 2018-10-26 19:46:20 +02:00
rawdevs raw/ifpga: add Intel FPGA bus rawdev driver 2018-05-11 17:09:26 +02:00
rel_notes ethdev: complete closing of port 2018-10-26 22:14:05 +02:00
sample_app_ug examples/kni: monitor and update link state continually 2018-10-26 19:46:23 +02:00
testpmd_app_ug app/testpmd: set packet dump based on verbosity level 2018-10-18 10:24:39 +02:00
tools doc: update eventdev app guide for Tx adapter 2018-10-01 16:54:15 +02:00
conf.py doc: add compression driver and ISA-L PMD guides 2018-05-10 17:46:20 +01:00
custom.css doc: improve HTML spacing in release notes 2018-02-14 00:23:25 +01:00
index.rst doc: add compression driver and ISA-L PMD guides 2018-05-10 17:46:20 +01:00