From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 7B25F1B4EA for ; Wed, 10 Oct 2018 00:33:47 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 24FA021B88; Tue, 9 Oct 2018 18:33:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 09 Oct 2018 18:33:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=Y766NleZ69 3tXZOHxguMLxEoQpbnCB9McIpIKzAkDUw=; b=IItCkzARA8HeTbR1Ob/LIb9Rkt 4Wz+Rg2F7uJmkYogjEfHM6T0NTqEwnNonV0slHAAw0J29VrGlGQ1LZO+V9uPXUrp 7JQ8tC9fomooEylUIQ5ATKDHgBgFNw5e+8Gjt2E8pPSVqt2gjskFKVT4mzgqNwgd 6i6RacLmHJRi/japM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Y766NleZ693tXZOHxguMLxEoQpbnCB9McIpIKzAkDUw=; b=d12lrBcc qYeLmfIOdq/hnQpHmsnVrlf6p6utyL0HQVSA5xSRGq3aDuqxkYaPCy4ynCnZMnMR fJBwXV9huR/U/1OxozE0FsvlgYJDBmRl9qCV3yr/AGLZjFNql8eN1V9n/5tpsm+8 QVznyqeKWxbdgVPRJGgt26MCtwOJtHv51bJISubceu0w/a/yMsR7egcsTfgxCnnj 7EJO5m3iRpWGW6gmSblKxORiPNrdGRlEUY94/HrEyPmct1l7H+bXxMq1+gbppkdq IJ//gBJpI8RP+4JOY1XH/bh4qYiDapoQaQQHzYYESId0kSQXnBoJc7RvqSRRiTv9 pDn7sEMuvqmFhw== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 102D1102EA; Tue, 9 Oct 2018 18:33:45 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com Date: Wed, 10 Oct 2018 00:33:38 +0200 Message-Id: <20181009223338.18307-7-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181009223338.18307-1-thomas@monjalon.net> References: <20181007222554.4886-1-thomas@monjalon.net> <20181009223338.18307-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 6/6] eal: remove deprecated attach/detach functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 22:33:47 -0000 These hotplug functions were deprecated and have some new replacements. As announced earlier, the oldest ones are now removed. Signed-off-by: Thomas Monjalon Reviewed-by: Andrew Rybchenko --- doc/guides/rel_notes/deprecation.rst | 5 --- doc/guides/rel_notes/release_18_11.rst | 6 +++ lib/librte_eal/common/eal_common_dev.c | 53 ------------------------- lib/librte_eal/common/include/rte_dev.h | 27 ------------- lib/librte_eal/rte_eal_version.map | 2 - 5 files changed, 6 insertions(+), 87 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index c24506dc1..c6bcb5e6e 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -64,11 +64,6 @@ Deprecation Notices Target release for removal of the legacy API will be defined once most PMDs have switched to rte_flow. -* 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()`` - should be used directly. - * pdump: As we changed to use generic IPC, some changes in APIs and structure are expected in subsequent release. diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst index 1f6ddcb6e..6fee3d9b1 100644 --- a/doc/guides/rel_notes/release_18_11.rst +++ b/doc/guides/rel_notes/release_18_11.rst @@ -126,6 +126,12 @@ API Changes * eal: The parameters of the function ``rte_devargs_remove()`` have changed from bus and device names to ``struct rte_devargs``. +* eal: The deprecated functions attach/detach were removed in 18.11. + ``rte_eal_dev_attach`` can be replaced by + ``rte_dev_probe`` or ``rte_eal_hotplug_add``. + ``rte_eal_dev_detach`` can be replaced by + ``rte_dev_remove`` or ``rte_eal_hotplug_remove``. + * mbuf: The ``__rte_mbuf_raw_free()`` and ``__rte_pktmbuf_prefree_seg()`` functions were deprecated since 17.05 and are replaced by ``rte_mbuf_raw_free()`` and ``rte_pktmbuf_prefree_seg()``. diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index e733eb779..85003f6c8 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -81,59 +81,6 @@ rte_dev_is_probed(const struct rte_device *dev) return dev->driver != NULL; } -int rte_eal_dev_attach(const char *name, const char *devargs) -{ - struct rte_bus *bus; - - if (name == NULL || devargs == NULL) { - RTE_LOG(ERR, EAL, "Invalid device or arguments provided\n"); - return -EINVAL; - } - - bus = rte_bus_find_by_device_name(name); - if (bus == NULL) { - RTE_LOG(ERR, EAL, "Unable to find a bus for the device '%s'\n", - name); - return -EINVAL; - } - if (strcmp(bus->name, "pci") == 0 || strcmp(bus->name, "vdev") == 0) - return rte_eal_hotplug_add(bus->name, name, devargs); - - RTE_LOG(ERR, EAL, - "Device attach is only supported for PCI and vdev devices.\n"); - - return -ENOTSUP; -} - -int rte_eal_dev_detach(struct rte_device *dev) -{ - struct rte_bus *bus; - int ret; - - if (dev == NULL) { - RTE_LOG(ERR, EAL, "Invalid device provided.\n"); - return -EINVAL; - } - - bus = rte_bus_find_by_device(dev); - if (bus == NULL) { - RTE_LOG(ERR, EAL, "Cannot find bus for device (%s)\n", - dev->name); - return -EINVAL; - } - - if (bus->unplug == NULL) { - RTE_LOG(ERR, EAL, "Bus function not supported\n"); - return -ENOTSUP; - } - - ret = bus->unplug(dev); - if (ret) - RTE_LOG(ERR, EAL, "Driver cannot detach the device (%s)\n", - dev->name); - return ret; -} - int rte_eal_hotplug_add(const char *busname, const char *devname, const char *drvargs) diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index a7ec8ec25..20791691a 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -176,33 +176,6 @@ struct rte_device { __rte_experimental int rte_dev_is_probed(const struct rte_device *dev); -/** - * Attach a device to a registered driver. - * - * @param name - * The device name, that refers to a pci device (or some private - * way of designating a vdev device). Based on this device name, eal - * will identify a driver capable of handling it and pass it to the - * driver probing function. - * @param devargs - * Device arguments to be passed to the driver. - * @return - * 0 on success, negative on error. - */ -__rte_deprecated -int rte_eal_dev_attach(const char *name, const char *devargs); - -/** - * Detach a device from its driver. - * - * @param dev - * A pointer to a rte_device structure. - * @return - * 0 on success, negative on error. - */ -__rte_deprecated -int rte_eal_dev_detach(struct rte_device *dev); - /** * Hotplug add a given device to a specific bus. * diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index dddcb81ea..8a5b1797c 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -130,8 +130,6 @@ DPDK_16.11 { rte_delay_us_block; rte_delay_us_callback_register; - rte_eal_dev_attach; - rte_eal_dev_detach; } DPDK_16.07; -- 2.19.0