summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-10-19 04:07:57 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:05 +0200
commit23ea57a2a0cecbb904a5feeb0650db116585ee28 (patch)
treec4e5d0508532d55e691912596798425b1bd42dd4 /doc
parent662dbc322d0467e0dcdcbbb2b2283a43a5b849e7 (diff)
downloaddpdk-23ea57a2a0cecbb904a5feeb0650db116585ee28.zip
dpdk-23ea57a2a0cecbb904a5feeb0650db116585ee28.tar.gz
dpdk-23ea57a2a0cecbb904a5feeb0650db116585ee28.tar.xz
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/guides/rel_notes/release_18_11.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
index d7655d3..7163a3e 100644
--- a/doc/guides/rel_notes/release_18_11.rst
+++ b/doc/guides/rel_notes/release_18_11.rst
@@ -309,6 +309,11 @@ API Changes
functions were deprecated since 17.05 and are replaced by
``rte_mbuf_raw_free()`` and ``rte_pktmbuf_prefree_seg()``.
+* ethdev: A call to ``rte_eth_dev_release_port()`` has been added in
+ ``rte_eth_dev_close()``. As a consequence, a closed port is freed
+ and seen as invalid because of its state ``RTE_ETH_DEV_UNUSED``.
+ This new behaviour is enabled per driver for a migration period.
+
* A new device flag, RTE_ETH_DEV_NOLIVE_MAC_ADDR, changes the order of
actions inside rte_eth_dev_start regarding MAC set. Some NICs do not
support MAC changes once the port has started and with this new device