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 5C154A0C43; Thu, 30 Sep 2021 18:02:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A76541100; Thu, 30 Sep 2021 18:02:05 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id CD020410F6 for ; Thu, 30 Sep 2021 18:02:03 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 9414F7F6DB; Thu, 30 Sep 2021 19:02:03 +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 E4C307F508; Thu, 30 Sep 2021 19:01:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru E4C307F508 Authentication-Results: shelob.oktetlabs.ru/E4C307F508; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Thomas Monjalon , Ferruh Yigit Cc: dev@dpdk.org Date: Thu, 30 Sep 2021 19:01:48 +0300 Message-Id: <20210930160156.961041-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> References: <20210604144225.287678-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 1/4] 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 --- 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