Go to file
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
app ethdev: complete closing of port 2018-10-26 22:14:05 +02:00
buildtools mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
config config: rename option for C11 memory model 2018-10-26 18:09:22 +02:00
devtools devtools: add git log checks for PHY 2018-10-25 16:52:43 +02:00
doc ethdev: complete closing of port 2018-10-26 22:14:05 +02:00
drivers ethdev: remove release function for secondary process 2018-10-26 22:14:05 +02:00
examples examples/vdpa: fix spelling in error message 2018-10-26 22:14:05 +02:00
kernel kni: fix build on Linux < 3.14 2018-10-27 00:18:06 +02:00
lib ethdev: complete closing of port 2018-10-26 22:14:05 +02:00
license license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
mk mk: use EXTRA_CFLAGS for pmdinfogen 2018-10-25 00:02:00 +02:00
pkg version: 18.08.0 2018-08-09 23:11:26 +02:00
test test/hash: add r/w concurrency to autotest 2018-10-26 22:14:17 +02:00
usertools usertools: add octeontx zip device for binding 2018-07-25 13:36:26 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add compression driver and ISA-L PMD guides 2018-05-10 17:46:20 +01:00
GNUmakefile move kernel modules directories 2018-03-21 23:04:21 +01:00
MAINTAINERS use registered name for OCTEON TX references 2018-10-26 14:16:05 +02:00
Makefile license: use SPDX tag in root makefile 2018-01-04 22:41:38 +01:00
meson_options.txt net/mlx5: support meson build 2018-09-28 01:41:01 +02:00
meson.build build: generate API documentation with meson 2018-09-18 15:50:54 +02:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org