From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 321C442CB3; Wed, 14 Jun 2023 17:21:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BB6040E0F; Wed, 14 Jun 2023 17:21:16 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id B759940DDB for ; Wed, 14 Jun 2023 17:21:14 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 51D835C016D; Wed, 14 Jun 2023 11:21:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 14 Jun 2023 11:21:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1686756074; x=1686842474; bh=1qQ1Y0LnmO +I5UmBY7GihnU4L0tlE6d6YaCJPq6oZME=; b=Wr1XKbc8JvQVA3LiotRvOLZclV JFDL8VJKGUXjDcEjRmBD8yrVX94jHVRusaipbwD4kCQt/lBjjO9/2O4yTICGipln PWHO6+KXD/jaBtNCyHyyZvSIT3cxgV51owraxH4hsKA6iyOPNrSatn4q8E2h5zMN Ka9v4rlgkPBuuWKC5UDgmjQNo0emIsAWdgSDlE8EpJ/PW50kG5RNFXHJ8v4ZJKX6 GGWLyqxk+IDiX9jA0iTLCEhLan3dvowGbFMRSSwS4vGuptwTFfdHvSYF1CBBSzCn LY4W1I8NwcWcBWpj2N30G5FNOkI+ORwUj6bDWmfzPLnm3pjjzFmn+tyhwKZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686756074; x=1686842474; bh=1qQ1Y0LnmO+I5 UmBY7GihnU4L0tlE6d6YaCJPq6oZME=; b=dIueqhSLAAa3Z62/AMkLCukV/rCxi jLhy2NZL0FKKQUMtTRhKfS8JWGoA4pzb9QNxPdsEFhH88Y/QPbHtt2lJiektYwDp WkEB4Ji6HZV93ZqIJLQOCFndc4Hy68KWERMHeajAX/D/x0YTUVEFdAF1CORKexCH 4kNDrk5JILaBsUFlsuH0f5yHcaoIIgL4JHsAt5s62Fw9oWAaG8HZ3N5iOPyB3Mbz 7B4F7RvSRduth2iUnDPltIWtjC4g1qR3C0onpDrdszERYhDC+a7LlEUbrECNCibd ZzmxFZdIuw4d2x0WtpeenHGNDYJOmpFYgAqK3At/GDOwxv4jOqmtLH54A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeevveefveeiiefhtedukeegkeelieegffeukeevudetueffieduveet iedukeefleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jun 2023 11:21:12 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Aman Singh , Yuying Zhang , Ferruh Yigit , Andrew Rybchenko , Dengdui Huang Subject: [PATCH] ethdev: rename functions checking queue validity Date: Wed, 14 Jun 2023 17:20:59 +0200 Message-Id: <20230614152100.1664198-1-thomas@monjalon.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Two functions helping to check Rx/Tx queues validity were added in DPDK 23.07-rc1. As the release is not closed, it is still time to rename. The name proposed originally rte_eth_dev_is_valid_*xq is consistent with this function: rte_eth_dev_is_valid_port() However, the suffixes "rxq" and "txq" are uncommon in ethdev functions. Also for shortness, many functions are dropping "_dev_" as these functions which manage the queues: rte_eth_*x_queue_info_get() rte_eth_*x_queue_setup() rte_eth_*x_hairpin_queue_setup For completeness, there are some old functions having "_dev_": rte_eth_dev_*x_queue_start() rte_eth_dev_*x_queue_stop() Anyway in all above examples, the subject is after the prefix, and the verb is at the end. That's why I propose renaming into: rte_eth_*x_queue_is_valid() Fixes: 7ea7e0cd3a08 ("ethdev: add functions to check queue validity") Signed-off-by: Thomas Monjalon --- app/test-pmd/cmdline.c | 6 +++--- lib/ethdev/rte_ethdev.c | 4 ++-- lib/ethdev/rte_ethdev.h | 4 ++-- lib/ethdev/version.map | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index a15a442a06..5da38b0bb4 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -12283,7 +12283,7 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result, int rc; if (!strcmp(res->cmd_keyword, "rxq")) { - if (rte_eth_dev_is_valid_rxq(res->cmd_pid, res->cmd_qid) != 0) { + if (rte_eth_rx_queue_is_valid(res->cmd_pid, res->cmd_qid) != 0) { fprintf(stderr, "Invalid input: port id = %d, queue id = %d\n", res->cmd_pid, res->cmd_qid); @@ -12304,7 +12304,7 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result, else printf("Desc status = UNAVAILABLE\n"); } else if (!strcmp(res->cmd_keyword, "txq")) { - if (rte_eth_dev_is_valid_txq(res->cmd_pid, res->cmd_qid) != 0) { + if (rte_eth_tx_queue_is_valid(res->cmd_pid, res->cmd_qid) != 0) { fprintf(stderr, "Invalid input: port id = %d, queue id = %d\n", res->cmd_pid, res->cmd_qid); @@ -12389,7 +12389,7 @@ cmd_show_rx_queue_desc_used_count_parsed(void *parsed_result, struct cmd_show_rx_queue_desc_used_count_result *res = parsed_result; int rc; - if (rte_eth_dev_is_valid_rxq(res->cmd_pid, res->cmd_qid) != 0) { + if (rte_eth_rx_queue_is_valid(res->cmd_pid, res->cmd_qid) != 0) { fprintf(stderr, "Invalid input: port id = %d, queue id = %d\n", res->cmd_pid, res->cmd_qid); diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 7317015895..843087e615 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -771,7 +771,7 @@ eth_dev_validate_tx_queue(const struct rte_eth_dev *dev, uint16_t tx_queue_id) } int -rte_eth_dev_is_valid_rxq(uint16_t port_id, uint16_t queue_id) +rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id) { struct rte_eth_dev *dev; @@ -782,7 +782,7 @@ rte_eth_dev_is_valid_rxq(uint16_t port_id, uint16_t queue_id) } int -rte_eth_dev_is_valid_txq(uint16_t port_id, uint16_t queue_id) +rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id) { struct rte_eth_dev *dev; diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index 34ca25bbc0..9466b21dd3 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -2683,7 +2683,7 @@ int rte_eth_dev_is_valid_port(uint16_t port_id); * - 0 if Rx queue is valid. */ __rte_experimental -int rte_eth_dev_is_valid_rxq(uint16_t port_id, uint16_t queue_id); +int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id); /** * @warning @@ -2702,7 +2702,7 @@ int rte_eth_dev_is_valid_rxq(uint16_t port_id, uint16_t queue_id); * - 0 if Tx queue is valid. */ __rte_experimental -int rte_eth_dev_is_valid_txq(uint16_t port_id, uint16_t queue_id); +int rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id); /** * Start specified Rx queue of a port. It is used when rx_deferred_start diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map index 1a33d72668..69c9f09a82 100644 --- a/lib/ethdev/version.map +++ b/lib/ethdev/version.map @@ -301,8 +301,8 @@ EXPERIMENTAL { rte_flow_async_create_by_index; # added in 23.07 - rte_eth_dev_is_valid_rxq; - rte_eth_dev_is_valid_txq; + rte_eth_rx_queue_is_valid; + rte_eth_tx_queue_is_valid; rte_flow_action_list_handle_create; rte_flow_action_list_handle_destroy; rte_flow_action_list_handle_query_update; -- 2.40.1