|author||Thomas Monjalon <firstname.lastname@example.org>||2018-10-23 10:28:40 +0200|
|committer||Ferruh Yigit <email@example.com>||2018-10-26 22:14:05 +0200|
ethdev: remove deprecated attach/detach functions
The hotplug attach/detach features are implemented in EAL layer. There is a new ethdev iterator to retrieve ports from ethdev layer. As announced earlier, the (buggy) ethdev functions are now removed. Signed-off-by: Thomas Monjalon <firstname.lastname@example.org> Reviewed-by: Andrew Rybchenko <email@example.com>
Diffstat (limited to 'doc')
4 files changed, 6 insertions, 114 deletions
diff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst
index c81d9c5..2086e24 100644
@@ -53,7 +53,6 @@ Programmer's Guide
diff --git a/doc/guides/prog_guide/port_hotplug_framework.rst b/doc/guides/prog_guide/port_hotplug_framework.rst
deleted file mode 100644
@@ -1,106 +0,0 @@
-.. BSD LICENSE
- Copyright(c) 2015 IGEL Co.,Ltd. All rights reserved.
- All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- * Neither the name of IGEL Co.,Ltd. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Port Hotplug Framework
-The Port Hotplug Framework provides DPDK applications with the ability to
-attach and detach ports at runtime. Because the framework depends on PMD
-implementation, the ports that PMDs cannot handle are out of scope of this
-framework. Furthermore, after detaching a port from a DPDK application, the
-framework doesn't provide a way for removing the devices from the system.
-For the ports backed by a physical NIC, the kernel will need to support PCI
-The basic requirements of the Port Hotplug Framework are:
-* DPDK applications that use the Port Hotplug Framework must manage their
- own ports.
- The Port Hotplug Framework is implemented to allow DPDK applications to
- manage ports. For example, when DPDK applications call the port attach
- function, the attached port number is returned. DPDK applications can
- also detach the port by port number.
-* Kernel support is needed for attaching or detaching physical device
- To attach new physical device ports, the device will be recognized by
- userspace driver I/O framework in kernel at first. Then DPDK
- applications can call the Port Hotplug functions to attach the ports.
- For detaching, steps are vice versa.
-* Before detaching, they must be stopped and closed.
- DPDK applications must call "rte_eth_dev_stop()" and
- "rte_eth_dev_close()" APIs before detaching ports. These functions will
- start finalization sequence of the PMDs.
-* The framework doesn't affect legacy DPDK applications behavior.
- If the Port Hotplug functions aren't called, all legacy DPDK apps can
- still work without modifications.
-Port Hotplug API overview
-* Attaching a port
- "rte_eth_dev_attach()" API attaches a port to DPDK application, and
- returns the attached port number. Before calling the API, the device
- should be recognized by an userspace driver I/O framework. The API
- receives a pci address like "0000:01:00.0" or a virtual device name
- like "net_pcap0,iface=eth0". In the case of virtual device name, the
- format is the same as the general "--vdev" option of DPDK.
-* Detaching a port
- "rte_eth_dev_detach()" API detaches a port from DPDK application, and
- returns a pci address of the detached device or a virtual device name
- of the device.
- "testpmd" supports the Port Hotplug Framework.
-* The Port Hotplug APIs are not thread safe.
-* The framework can only be enabled with Linux. BSD is not supported.
-* Not all PMDs support detaching feature.
- The underlying bus must support hot-unplug. If not supported,
- the function ``rte_eth_dev_detach()`` will return negative ENOTSUP.
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9f825f0..6b51c9d 100644
@@ -49,13 +49,6 @@ Deprecation Notices
Target release for removal of the legacy API will be defined once most
PMDs have switched to rte_flow.
-* ethdev: In v18.11 ``rte_eth_dev_attach()`` and ``rte_eth_dev_detach()``
- will be removed.
- Hotplug functions ``rte_eal_hotplug_add()`` and ``rte_eal_hotplug_remove()``
- should be used instread.
- Function ``rte_eth_dev_get_port_by_name()`` may be used to find
- identifier of the added port.
* eal: In v18.11 ``rte_eal_dev_attach()`` and ``rte_eal_dev_detach()``
will be removed.
Hotplug functions ``rte_eal_hotplug_add()`` and ``rte_eal_hotplug_remove()``
diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst
index 7163a3e..e9d447a 100644
@@ -309,6 +309,12 @@ API Changes
functions were deprecated since 17.05 and are replaced by
``rte_mbuf_raw_free()`` and ``rte_pktmbuf_prefree_seg()``.
+* ethdev: The deprecated functions attach/detach were removed in 18.11.
+ ``rte_eth_dev_attach`` can be replaced by ``RTE_ETH_FOREACH_MATCHING_DEV``
+ and ``rte_dev_probe`` or ``rte_eal_hotplug_add``.
+ ``rte_eth_dev_detach`` can be replaced by
+ ``rte_dev_remove`` or ``rte_eal_hotplug_remove``.
* 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``.