Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/47219/?format=api
http://patches.dpdk.org/api/patches/47219/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181023082842.7963-6-thomas@monjalon.net/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20181023082842.7963-6-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20181023082842.7963-6-thomas@monjalon.net", "date": "2018-10-23T08:28:40", "name": "[v7,5/7] ethdev: remove deprecated attach/detach functions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "46229dcec64bf32d0c777405f12d1f51aa056214", "submitter": { "id": 685, "url": "http://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20181023082842.7963-6-thomas@monjalon.net/mbox/", "series": [ { "id": 2026, "url": "http://patches.dpdk.org/api/series/2026/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2026", "date": "2018-10-23T08:28:35", "name": "replace attach/detach functions", "version": 7, "mbox": "http://patches.dpdk.org/series/2026/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/47219/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/47219/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C5FFE1B3EE;\n\tTue, 23 Oct 2018 10:29:06 +0200 (CEST)", "from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com\n\t[66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 6753D1B3A9\n\tfor <dev@dpdk.org>; Tue, 23 Oct 2018 10:28:54 +0200 (CEST)", "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 12DD821EAE;\n\tTue, 23 Oct 2018 04:28:54 -0400 (EDT)", "from mailfrontend1 ([10.202.2.162])\n\tby compute1.internal (MEProxy); Tue, 23 Oct 2018 04:28:54 -0400", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id D4688E4240;\n\tTue, 23 Oct 2018 04:28:52 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tfrom:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding; s=mesmtp; bh=+jz8zlhO0A\n\tcXA2iTLQ/YKopTO8VuUfUhUWKxwvB1MFQ=; b=ZUj/B/UBIrO5J1tpSHDKCMlj01\n\tjpv1UhEMuPwquloFpje8rl20295Q/9ejPiZCfxp+bGfx+ok5tOF00iYi/4QJzuZJ\n\tBFv7Cz9j/B1uONxai7BVsr3X5CFUF1NPv2ayG5RcFdhWcJG5sgBPUtYa4O8iPY/N\n\tE+3pkTRU2cU7P28ik=", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-transfer-encoding:date:from\n\t:in-reply-to:message-id:mime-version:references:subject:to\n\t:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n\tfm1; bh=+jz8zlhO0AcXA2iTLQ/YKopTO8VuUfUhUWKxwvB1MFQ=; b=igFRTHdj\n\tpAXWGBLzPtQgsr1zvrvpxXZY5r+DjN6oWzoqO+JFGrwUj6/7LukTlg9qcvSS/gAf\n\ttvRdjQHjBPzPKujxBCdBFfj3UZZoDYe9eHcVzo4OmIBJ2icjdfvRdk5gjiF6fyRh\n\teQjBxeV9atBENnYVeUnwu0AMtfA8iPUMCQoD1x9EeKZ5o0cc/4HA+HD/gB4yqSuT\n\tQPSEJeVRLJ8MgjxccYwe5WXPqfW/S0quVBYaGq2B61bzLQ8IDOCZXk+NF8dj8Dap\n\tMDQK5jMl2NynExt/oMMlU1XEL3lUMoOgTqS83hlDIbkwgrNM+JTA0FDQ+CX0zY4Z\n\tAUMm7CYpGQ+rFA==" ], "X-ME-Sender": "<xms:xdvOW7q8XZNoiZet0h9vTwqjiLn5FfsOwdiyIMTInH5QniEO5U5fqA>", "X-ME-Proxy": "<xmx:xdvOW-ihXuOwc0PTJsKEkLjO04VoX6aVQ7xB0sieGVX0dy8Q4r-qNQ>\n\t<xmx:xdvOW6LIFIvwhvFwABIEVqdEGtQHCi-6kRUNA7nsyPKtixWbk2ffRA>\n\t<xmx:xdvOW8efIOgwj6BCIEwRXB3jl4z48o0gldDMzd17WfajePsX4MhS3g>\n\t<xmx:xdvOWyPCd0VEcdK2IxqwfvjJnprVdvWNdqkhWXB1ISYw8w9rzYXo2w>\n\t<xmx:xdvOW-JPXVLC_mhb2NXmzHkX30lpdD9LR1Rq-ig0uskIYFAg1zH9OA>\n\t<xmx:xtvOWzpb6arnKaB4zQ1jNQU86FmCMv4ZDPExUW96k5TzGeWXAd8n0g>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "gaetan.rivet@6wind.com, ophirmu@mellanox.com, wisamm@mellanox.com,\n\tferruh.yigit@intel.com, arybchenko@solarflare.com,\n\tbernard.iremonger@intel.com", "Date": "Tue, 23 Oct 2018 10:28:40 +0200", "Message-Id": "<20181023082842.7963-6-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.19.0", "In-Reply-To": "<20181023082842.7963-1-thomas@monjalon.net>", "References": "<20181007222554.4886-1-thomas@monjalon.net>\n\t<20181023082842.7963-1-thomas@monjalon.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v7 5/7] ethdev: remove deprecated attach/detach\n\tfunctions", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The hotplug attach/detach features are implemented in EAL layer.\nThere is a new ethdev iterator to retrieve ports from ethdev layer.\n\nAs announced earlier, the (buggy) ethdev functions are now removed.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\nReviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n app/test-pmd/testpmd.c | 22 +++-\n doc/guides/prog_guide/index.rst | 1 -\n .../prog_guide/port_hotplug_framework.rst | 106 ------------------\n doc/guides/rel_notes/deprecation.rst | 7 --\n doc/guides/rel_notes/release_18_11.rst | 6 +\n drivers/net/virtio/virtio_user_ethdev.c | 1 -\n lib/librte_ethdev/rte_ethdev.c | 81 -------------\n lib/librte_ethdev/rte_ethdev.h | 31 -----\n lib/librte_ethdev/rte_ethdev_version.map | 2 -\n 9 files changed, 22 insertions(+), 235 deletions(-)\n delete mode 100644 doc/guides/prog_guide/port_hotplug_framework.rst", "diff": "diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex eea6df0fa..14647fa19 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -481,6 +481,7 @@ struct nvgre_encap_conf nvgre_encap_conf = {\n };\n \n /* Forward function declarations */\n+static void setup_attached_port(portid_t pi);\n static void map_port_queue_stats_mapping_registers(portid_t pi,\n \t\t\t\t\t\t struct rte_port *port);\n static void check_all_ports_link_status(uint32_t port_mask);\n@@ -2308,7 +2309,7 @@ void\n attach_port(char *identifier)\n {\n \tportid_t pi = 0;\n-\tunsigned int socket_id;\n+\tstruct rte_dev_iterator iterator;\n \n \tprintf(\"Attaching a new port...\\n\");\n \n@@ -2317,8 +2318,19 @@ attach_port(char *identifier)\n \t\treturn;\n \t}\n \n-\tif (rte_eth_dev_attach(identifier, &pi))\n+\tif (rte_dev_probe(identifier) != 0) {\n+\t\tTESTPMD_LOG(ERR, \"Failed to attach port %s\\n\", identifier);\n \t\treturn;\n+\t}\n+\n+\tRTE_ETH_FOREACH_MATCHING_DEV(pi, identifier, &iterator)\n+\t\tsetup_attached_port(pi);\n+}\n+\n+static void\n+setup_attached_port(portid_t pi)\n+{\n+\tunsigned int socket_id;\n \n \tsocket_id = (unsigned)rte_eth_dev_socket_id(pi);\n \t/* if socket_id is invalid, set to the first available socket. */\n@@ -2341,9 +2353,7 @@ attach_port(char *identifier)\n void\n detach_port(portid_t port_id)\n {\n-\tchar name[RTE_ETH_NAME_MAX_LEN];\n-\n-\tprintf(\"Detaching a port...\\n\");\n+\tprintf(\"Removing a device...\\n\");\n \n \tif (ports[port_id].port_status != RTE_PORT_CLOSED) {\n \t\tif (ports[port_id].port_status != RTE_PORT_STOPPED) {\n@@ -2355,7 +2365,7 @@ detach_port(portid_t port_id)\n \t\t\tport_flow_flush(port_id);\n \t}\n \n-\tif (rte_eth_dev_detach(port_id, name)) {\n+\tif (rte_dev_remove(rte_eth_devices[port_id].device) != 0) {\n \t\tTESTPMD_LOG(ERR, \"Failed to detach port %u\\n\", port_id);\n \t\treturn;\n \t}\ndiff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst\nindex c81d9c54f..2086e2442 100644\n--- a/doc/guides/prog_guide/index.rst\n+++ b/doc/guides/prog_guide/index.rst\n@@ -53,7 +53,6 @@ Programmer's Guide\n packet_framework\n vhost_lib\n metrics_lib\n- port_hotplug_framework\n bpf_lib\n source_org\n dev_kit_build_system\ndiff --git a/doc/guides/prog_guide/port_hotplug_framework.rst b/doc/guides/prog_guide/port_hotplug_framework.rst\ndeleted file mode 100644\nindex fb0efc18f..000000000\n--- a/doc/guides/prog_guide/port_hotplug_framework.rst\n+++ /dev/null\n@@ -1,106 +0,0 @@\n-.. BSD LICENSE\n- Copyright(c) 2015 IGEL Co.,Ltd. All rights reserved.\n- All rights reserved.\n-\n- Redistribution and use in source and binary forms, with or without\n- modification, are permitted provided that the following conditions\n- are met:\n-\n- * Redistributions of source code must retain the above copyright\n- notice, this list of conditions and the following disclaimer.\n- * Redistributions in binary form must reproduce the above copyright\n- notice, this list of conditions and the following disclaimer in\n- the documentation and/or other materials provided with the\n- distribution.\n- * Neither the name of IGEL Co.,Ltd. nor the names of its\n- contributors may be used to endorse or promote products derived\n- from this software without specific prior written permission.\n-\n- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n- \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-\n-Port Hotplug Framework\n-======================\n-\n-The Port Hotplug Framework provides DPDK applications with the ability to\n-attach and detach ports at runtime. Because the framework depends on PMD\n-implementation, the ports that PMDs cannot handle are out of scope of this\n-framework. Furthermore, after detaching a port from a DPDK application, the\n-framework doesn't provide a way for removing the devices from the system.\n-For the ports backed by a physical NIC, the kernel will need to support PCI\n-Hotplug feature.\n-\n-Overview\n---------\n-\n-The basic requirements of the Port Hotplug Framework are:\n-\n-* DPDK applications that use the Port Hotplug Framework must manage their\n- own ports.\n-\n- The Port Hotplug Framework is implemented to allow DPDK applications to\n- manage ports. For example, when DPDK applications call the port attach\n- function, the attached port number is returned. DPDK applications can\n- also detach the port by port number.\n-\n-* Kernel support is needed for attaching or detaching physical device\n- ports.\n-\n- To attach new physical device ports, the device will be recognized by\n- userspace driver I/O framework in kernel at first. Then DPDK\n- applications can call the Port Hotplug functions to attach the ports.\n- For detaching, steps are vice versa.\n-\n-* Before detaching, they must be stopped and closed.\n-\n- DPDK applications must call \"rte_eth_dev_stop()\" and\n- \"rte_eth_dev_close()\" APIs before detaching ports. These functions will\n- start finalization sequence of the PMDs.\n-\n-* The framework doesn't affect legacy DPDK applications behavior.\n-\n- If the Port Hotplug functions aren't called, all legacy DPDK apps can\n- still work without modifications.\n-\n-Port Hotplug API overview\n--------------------------\n-\n-* Attaching a port\n-\n- \"rte_eth_dev_attach()\" API attaches a port to DPDK application, and\n- returns the attached port number. Before calling the API, the device\n- should be recognized by an userspace driver I/O framework. The API\n- receives a pci address like \"0000:01:00.0\" or a virtual device name\n- like \"net_pcap0,iface=eth0\". In the case of virtual device name, the\n- format is the same as the general \"--vdev\" option of DPDK.\n-\n-* Detaching a port\n-\n- \"rte_eth_dev_detach()\" API detaches a port from DPDK application, and\n- returns a pci address of the detached device or a virtual device name\n- of the device.\n-\n-Reference\n----------\n-\n- \"testpmd\" supports the Port Hotplug Framework.\n-\n-Limitations\n------------\n-\n-* The Port Hotplug APIs are not thread safe.\n-\n-* The framework can only be enabled with Linux. BSD is not supported.\n-\n-* Not all PMDs support detaching feature.\n- The underlying bus must support hot-unplug. If not supported,\n- the function ``rte_eth_dev_detach()`` will return negative ENOTSUP.\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex 9f825f09e..6b51c9d28 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -49,13 +49,6 @@ Deprecation Notices\n Target release for removal of the legacy API will be defined once most\n PMDs have switched to rte_flow.\n \n-* ethdev: In v18.11 ``rte_eth_dev_attach()`` and ``rte_eth_dev_detach()``\n- will be removed.\n- Hotplug functions ``rte_eal_hotplug_add()`` and ``rte_eal_hotplug_remove()``\n- should be used instread.\n- Function ``rte_eth_dev_get_port_by_name()`` may be used to find\n- identifier of the added port.\n-\n * eal: In v18.11 ``rte_eal_dev_attach()`` and ``rte_eal_dev_detach()``\n will be removed.\n Hotplug functions ``rte_eal_hotplug_add()`` and ``rte_eal_hotplug_remove()``\ndiff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst\nindex b1028b493..e7e676a05 100644\n--- a/doc/guides/rel_notes/release_18_11.rst\n+++ b/doc/guides/rel_notes/release_18_11.rst\n@@ -242,6 +242,12 @@ API Changes\n functions were deprecated since 17.05 and are replaced by\n ``rte_mbuf_raw_free()`` and ``rte_pktmbuf_prefree_seg()``.\n \n+* ethdev: The deprecated functions attach/detach were removed in 18.11.\n+ ``rte_eth_dev_attach`` can be replaced by ``RTE_ETH_FOREACH_MATCHING_DEV``\n+ and ``rte_dev_probe`` or ``rte_eal_hotplug_add``.\n+ ``rte_eth_dev_detach`` can be replaced by\n+ ``rte_dev_remove`` or ``rte_eal_hotplug_remove``.\n+\n * ethdev: A call to ``rte_eth_dev_release_port()`` has been added in\n ``rte_eth_dev_close()``. As a consequence, a closed port is freed\n and seen as invalid because of its state ``RTE_ETH_DEV_UNUSED``.\ndiff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c\nindex 420364b7a..b51cbc85b 100644\n--- a/drivers/net/virtio/virtio_user_ethdev.c\n+++ b/drivers/net/virtio/virtio_user_ethdev.c\n@@ -635,7 +635,6 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \treturn ret;\n }\n \n-/** Called by rte_eth_dev_detach() */\n static int\n virtio_user_pmd_remove(struct rte_vdev_device *vdev)\n {\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 7ed71744c..2b218d4a2 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -800,87 +800,6 @@ eth_err(uint16_t port_id, int ret)\n \treturn ret;\n }\n \n-/* attach the new device, then store port_id of the device */\n-int\n-rte_eth_dev_attach(const char *devargs, uint16_t *port_id)\n-{\n-\tint current = rte_eth_dev_count_total();\n-\tstruct rte_devargs da;\n-\tint ret = -1;\n-\n-\tmemset(&da, 0, sizeof(da));\n-\n-\tif ((devargs == NULL) || (port_id == NULL)) {\n-\t\tret = -EINVAL;\n-\t\tgoto err;\n-\t}\n-\n-\t/* parse devargs */\n-\tif (rte_devargs_parse(&da, devargs))\n-\t\tgoto err;\n-\n-\tret = rte_eal_hotplug_add(da.bus->name, da.name, da.args);\n-\tif (ret < 0)\n-\t\tgoto err;\n-\n-\t/* no point looking at the port count if no port exists */\n-\tif (!rte_eth_dev_count_total()) {\n-\t\tRTE_ETHDEV_LOG(ERR, \"No port found for device (%s)\\n\", da.name);\n-\t\tret = -1;\n-\t\tgoto err;\n-\t}\n-\n-\t/* if nothing happened, there is a bug here, since some driver told us\n-\t * it did attach a device, but did not create a port.\n-\t * FIXME: race condition in case of plug-out of another device\n-\t */\n-\tif (current == rte_eth_dev_count_total()) {\n-\t\tret = -1;\n-\t\tgoto err;\n-\t}\n-\n-\t*port_id = eth_dev_last_created_port;\n-\tret = 0;\n-\n-err:\n-\tfree(da.args);\n-\treturn ret;\n-}\n-\n-/* detach the device, then store the name of the device */\n-int\n-rte_eth_dev_detach(uint16_t port_id, char *name __rte_unused)\n-{\n-\tstruct rte_device *dev;\n-\tstruct rte_bus *bus;\n-\tuint32_t dev_flags;\n-\tint ret = -1;\n-\n-\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n-\n-\tdev_flags = rte_eth_devices[port_id].data->dev_flags;\n-\tif (dev_flags & RTE_ETH_DEV_BONDED_SLAVE) {\n-\t\tRTE_ETHDEV_LOG(ERR,\n-\t\t\t\"Port %\"PRIu16\" is bonded, cannot detach\\n\", port_id);\n-\t\treturn -ENOTSUP;\n-\t}\n-\n-\tdev = rte_eth_devices[port_id].device;\n-\tif (dev == NULL)\n-\t\treturn -EINVAL;\n-\n-\tbus = rte_bus_find_by_device(dev);\n-\tif (bus == NULL)\n-\t\treturn -ENOENT;\n-\n-\tret = rte_eal_hotplug_remove(bus->name, dev->name);\n-\tif (ret < 0)\n-\t\treturn ret;\n-\n-\trte_eth_dev_release_port(&rte_eth_devices[port_id]);\n-\treturn 0;\n-}\n-\n static int\n rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n {\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex e4ee45ef5..c0392bec2 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1504,37 +1504,6 @@ uint16_t rte_eth_dev_count_avail(void);\n */\n uint16_t __rte_experimental rte_eth_dev_count_total(void);\n \n-/**\n- * Attach a new Ethernet device specified by arguments.\n- *\n- * @param devargs\n- * A pointer to a strings array describing the new device\n- * to be attached. The strings should be a pci address like\n- * '0000:01:00.0' or virtual device name like 'net_pcap0'.\n- * @param port_id\n- * A pointer to a port identifier actually attached.\n- * @return\n- * 0 on success and port_id is filled, negative on error\n- */\n-__rte_deprecated\n-int rte_eth_dev_attach(const char *devargs, uint16_t *port_id);\n-\n-/**\n- * Detach a Ethernet device specified by port identifier.\n- * This function must be called when the device is in the\n- * closed state.\n- *\n- * @param port_id\n- * The port identifier of the device to detach.\n- * @param devname\n- * A pointer to a buffer that will be filled with the device name.\n- * This buffer must be at least RTE_DEV_NAME_MAX_LEN long.\n- * @return\n- * 0 on success and devname is filled, negative on error\n- */\n-__rte_deprecated\n-int rte_eth_dev_detach(uint16_t port_id, char *devname);\n-\n /**\n * Convert a numerical speed in Mbps to a bitmap flag that can be used in\n * the bitmap link_speeds of the struct rte_eth_conf\ndiff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map\nindex 399380ad3..8038d4e5b 100644\n--- a/lib/librte_ethdev/rte_ethdev_version.map\n+++ b/lib/librte_ethdev/rte_ethdev_version.map\n@@ -8,14 +8,12 @@ DPDK_2.2 {\n \trte_eth_allmulticast_get;\n \trte_eth_dev_allocate;\n \trte_eth_dev_allocated;\n-\trte_eth_dev_attach;\n \trte_eth_dev_callback_register;\n \trte_eth_dev_callback_unregister;\n \trte_eth_dev_close;\n \trte_eth_dev_configure;\n \trte_eth_dev_count;\n \trte_eth_dev_default_mac_addr_set;\n-\trte_eth_dev_detach;\n \trte_eth_dev_filter_supported;\n \trte_eth_dev_flow_ctrl_get;\n \trte_eth_dev_flow_ctrl_set;\n", "prefixes": [ "v7", "5/7" ] }{ "id": 47219, "url": "