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 A4147A0032; Fri, 1 Oct 2021 11:07:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2870A41124; Fri, 1 Oct 2021 11:07:37 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 7605741143 for ; Fri, 1 Oct 2021 11:07:35 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 4824F7F6D7; Fri, 1 Oct 2021 12:07:35 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id E05C17F52E; Fri, 1 Oct 2021 12:07:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru E05C17F52E Authentication-Results: shelob.oktetlabs.ru/E05C17F52E; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Thomas Monjalon , Ferruh Yigit Cc: dev@dpdk.org Date: Fri, 1 Oct 2021 12:07:20 +0300 Message-Id: <20211001090723.1414911-2-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211001090723.1414911-1-andrew.rybchenko@oktetlabs.ru> References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> <20211001090723.1414911-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v9 2/5] ethdev: do not use get xstats names by IDs to obtain count 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 Sender: "dev" Relax requirements on get xstats names by IDs. After the patch corresponding the driver operation is called with non-NULL ids and xstats_names parameters only. Signed-off-by: Andrew Rybchenko Acked-by: Ferruh Yigit --- lib/ethdev/rte_ethdev.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index daf5ca9242..e5ddc1b81f 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -2866,12 +2866,6 @@ eth_dev_get_xstats_count(uint16_t port_id) RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id]; - if (dev->dev_ops->xstats_get_names_by_id != NULL) { - count = (*dev->dev_ops->xstats_get_names_by_id)(dev, NULL, - NULL, 0); - if (count < 0) - return eth_err(port_id, count); - } if (dev->dev_ops->xstats_get_names != NULL) { count = (*dev->dev_ops->xstats_get_names)(dev, NULL, 0); if (count < 0) -- 2.30.2