From patchwork Thu Nov 1 14:46:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 47682 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 205D61B28B; Thu, 1 Nov 2018 15:46:53 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 4B50E683E for ; Thu, 1 Nov 2018 15:46:51 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EAA8021E81; Thu, 1 Nov 2018 10:46:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 01 Nov 2018 10:46:50 -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=J5GoonNrOC B5+7SXdubkFCoA8Od5/9OKbNIgWs6q46c=; b=OrVTwUNkqyXd/eW8MdJjYlIeUw Y9wGrlp1VlQUQ3504ej1dzLvT23mHPNXc6prgIH9mNY424VNM7b+iQ96SIRhNad1 rcTzTueQSTgJ4LN8zFB1rJFoy8UJHja9V/uHP05TMiUVSWwjtaQBXH5ZCuCPnHRM Z7udGBw4Zn1DKZw3U= 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=J5GoonNrOCB5+7SXdubkFCoA8Od5/9OKbNIgWs6q46c=; b=Z0R54ao9 nGmb+KkP/RccFZED6GfQ90+Gio/kGi08xAtltJgitdyO791KnhDUEJkIHO3yKjhC 3dpiNk1uLavALhPgWAimQeXSX6fCqElXwj6l/y3kr2aXsBP8IgBw2gLmUiukpsUc XopXe8olPimq/79xw6KpSQvPyyX3B+r52/+3Qg8toi6AuJ42r2ZV5W3q/EuMi98R frs+5JqX7kK+AUyf3LSjo88ghh85PRxa8M+uxx8pUfyAn6dg6V/QDLDVW9PI/U3w KrVuTDsciQ26qMPUI3wxL/50xklwsfLCjVGKVENgzLI9EJXpbRL8pxN/NozIj2uw sY0hDdBXp6l6lQ== 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 D934B10412; Thu, 1 Nov 2018 10:46:49 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: ophirmu@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com, ktraynor@redhat.com, ian.stokes@intel.com Date: Thu, 1 Nov 2018 15:46:32 +0100 Message-Id: <20181101144633.13429-2-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181101144633.13429-1-thomas@monjalon.net> References: <20181101144633.13429-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/2] eal: remove experimental tag for probe/remove 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The functions rte_dev_probe() and rte_dev_remove() are new in DPDK 18.11 so they got the experimental tag by policy. However they are too much basic functions for being skipped by strict applications which do not use experimental functions. The alternative is to use rte_eal_hotplug_add() and rte_eal_hotplug_remove(), but their API requires the application to parse the devargs string in order to provide bus name, device name and driver arguments. The new function rte_dev_probe() is really simpler to use and more flexible by accepting any devargs string. Let's encourage applications to use it. The old functions rte_eal_hotplug_* may be deprecated later. Signed-off-by: Thomas Monjalon Acked-by: Kevin Traynor Tested-by: Kevin Traynor --- lib/librte_eal/common/eal_common_dev.c | 4 ++-- lib/librte_eal/common/include/rte_dev.h | 10 ++-------- lib/librte_eal/rte_eal_version.map | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index 62e9ed477..5759ec2d8 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -186,7 +186,7 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev) return ret; } -int __rte_experimental +int rte_dev_probe(const char *devargs) { struct eal_dev_mp_req req; @@ -322,7 +322,7 @@ local_dev_remove(struct rte_device *dev) return 0; } -int __rte_experimental +int rte_dev_remove(struct rte_device *dev) { struct eal_dev_mp_req req; diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index cd6c187cc..a9724dc91 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -196,9 +196,6 @@ int rte_eal_hotplug_add(const char *busname, const char *devname, const char *drvargs); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice - * * Add matching devices. * * In multi-process, it will request other processes to add the same device. @@ -209,7 +206,7 @@ int rte_eal_hotplug_add(const char *busname, const char *devname, * @return * 0 on success, negative on error. */ -int __rte_experimental rte_dev_probe(const char *devargs); +int rte_dev_probe(const char *devargs); /** * Hotplug remove a given device from a specific bus. @@ -227,9 +224,6 @@ int __rte_experimental rte_dev_probe(const char *devargs); int rte_eal_hotplug_remove(const char *busname, const char *devname); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice - * * Remove one device. * * In multi-process, it will request other processes to remove the same device. @@ -240,7 +234,7 @@ int rte_eal_hotplug_remove(const char *busname, const char *devname); * @return * 0 on success, negative on error. */ -int __rte_experimental rte_dev_remove(struct rte_device *dev); +int rte_dev_remove(struct rte_device *dev); /** * Device comparison function. diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 04f624246..be4976e3d 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -262,6 +262,8 @@ DPDK_18.11 { rte_eal_get_runtime_dir; rte_eal_hotplug_add; rte_eal_hotplug_remove; + rte_dev_probe; + rte_dev_remove; rte_strscpy; } DPDK_18.08; @@ -285,8 +287,6 @@ EXPERIMENTAL { rte_dev_is_probed; rte_dev_iterator_init; rte_dev_iterator_next; - rte_dev_probe; - rte_dev_remove; rte_devargs_add; rte_devargs_dump; rte_devargs_insert; From patchwork Thu Nov 1 14:46:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 47683 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A90A11B2AF; Thu, 1 Nov 2018 15:46:54 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 5E2701B2AC for ; Thu, 1 Nov 2018 15:46:53 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id F2A7A21ABB; Thu, 1 Nov 2018 10:46:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 01 Nov 2018 10:46:52 -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=i//HGx5n2q 42jKTpMZeMQ6m45qocsfbQ3noNEJIwwtg=; b=XU+9ztPJFcqmgZTSQe5mvctskq 1TjGfzqYqo29C7LHUn6O97ZiPLamD5a9TUQ8H0UaJu9kfbSDDlN/w2KMUl02GqTT nWaGxuF1I6TWqEmZ2vTpOuufBuyTSHW6S18gqEDA8/A/vN/63JPlEYYnUxzeEXXf Pm/APCB4e/dQiUA/Y= 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=i//HGx5n2q42jKTpMZeMQ6m45qocsfbQ3noNEJIwwtg=; b=f4hvzTcS KjftgRhYW6dYvW7UHGYHb1PuSo+neR+nhpQf17IsN9IYnyRVf2jXggBsstExQeiS cYEFzdPbZVW4b34uEfu4PwIgqQjRCi8rm/Ljbc9Ayo5fqJkqZbKkkAtKJNO/+Mn5 +eZNDWqKw0squkbb+evfhN1mpkr6mxajY78dr+BLvCnMdC6uWHBfCF5qyBzowW9v 2MbmeF2oL3sEy6CeoIHiYsqKHyTmP/BSemC0mvFPNdcVQs7kOS/IdNt/wHB7sMHl 8lTxEvJzRygq/vK5pC/bqmshJXiVBNOWGRbV6Hgv0Xu53yIlC4OaV9p6mkF+G653 A1SdQCaK8hYb0Q== 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 CD0C610413; Thu, 1 Nov 2018 10:46:51 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: ophirmu@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com, ktraynor@redhat.com, ian.stokes@intel.com Date: Thu, 1 Nov 2018 15:46:33 +0100 Message-Id: <20181101144633.13429-3-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181101144633.13429-1-thomas@monjalon.net> References: <20181101144633.13429-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] ethdev: remove experimental tag for iterator API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" After removing the function rte_eth_dev_attach(), there are two replacement solutions possible: one using probe event notification, and one using a new iterator. So the application can get the new probed ports either asynchronously or synchronously. The iterator API is new in DPDK 18.11 so they got the experimental tag by policy. It causes an issue for strict applications which do not use experimental functions, and want to use the synchronous method. The replacement for removed API should not be experimental. That's why the experimental status of the ethdev iterator is removed. Signed-off-by: Thomas Monjalon Acked-by: Kevin Traynor Tested-by: Kevin Traynor --- lib/librte_ethdev/rte_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.h | 12 ------------ lib/librte_ethdev/rte_ethdev_version.map | 6 +++--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 9d3481389..d59154c69 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -187,7 +187,7 @@ enum { STAT_QMAP_RX }; -int __rte_experimental +int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) { int ret; @@ -288,7 +288,7 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) return ret; } -uint16_t __rte_experimental +uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter) { if (iter->cls == NULL) /* invalid ethdev iterator */ @@ -317,7 +317,7 @@ rte_eth_iterator_next(struct rte_dev_iterator *iter) return RTE_MAX_ETHPORTS; } -void __rte_experimental +void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter) { if (iter->bus_str == NULL) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 769a69430..8a92d91e3 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -167,9 +167,6 @@ extern int rte_eth_dev_logtype; struct rte_mbuf; /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Initializes a device iterator. * * This iterator allows accessing a list of devices matching some devargs. @@ -185,13 +182,9 @@ struct rte_mbuf; * @return * 0 on successful initialization, negative otherwise. */ -__rte_experimental int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Iterates on devices with devargs filter. * The ownership is not checked. * @@ -205,13 +198,9 @@ int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs); * @return * A port id if found, RTE_MAX_ETHPORTS otherwise. */ -__rte_experimental uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Free some allocated fields of the iterator. * * This function is automatically called by rte_eth_iterator_next() @@ -223,7 +212,6 @@ uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter); * Device iterator handle initialized by rte_eth_iterator_init(). * The fields bus_str and cls_str are freed if needed. */ -__rte_experimental void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter); /** diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map index 3560c288b..92ac3de25 100644 --- a/lib/librte_ethdev/rte_ethdev_version.map +++ b/lib/librte_ethdev/rte_ethdev_version.map @@ -223,6 +223,9 @@ DPDK_18.11 { rte_eth_dev_rx_offload_name; rte_eth_dev_tx_offload_name; + rte_eth_iterator_cleanup; + rte_eth_iterator_init; + rte_eth_iterator_next; } DPDK_18.08; @@ -242,9 +245,6 @@ EXPERIMENTAL { rte_eth_dev_owner_set; rte_eth_dev_owner_unset; rte_eth_dev_rx_intr_ctl_q_get_fd; - rte_eth_iterator_cleanup; - rte_eth_iterator_init; - rte_eth_iterator_next; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; rte_flow_conv;