numam-dpdk/doc
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
..
api doc: add deprecated list in doxygen 2018-10-25 16:35:52 +02:00
guides ethdev: complete closing of port 2018-10-26 22:14:05 +02:00
logo doc: change theme of guides 2015-12-13 22:30:47 +01:00
build-sdk-meson.txt build: generate API documentation with meson 2018-09-18 15:50:54 +02:00
build-sdk-quick.txt doc: add tags and cscope make targets to quick help 2017-08-05 11:04:47 +02:00
meson.build build: generate API documentation with meson 2018-09-18 15:50:54 +02:00