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 BE93CA0032; Tue, 28 Sep 2021 13:29:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A11C410E5; Tue, 28 Sep 2021 13:29:37 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 1532240DF6 for ; Tue, 28 Sep 2021 13:29:36 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id BA1637F6DE; Tue, 28 Sep 2021 14:29: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 1DF567F6D2; Tue, 28 Sep 2021 14:29:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 1DF567F6D2 Authentication-Results: shelob.oktetlabs.ru/1DF567F6D2; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: Ivan Ilchenko Date: Tue, 28 Sep 2021 14:29:02 +0300 Message-Id: <20210928112912.785412-2-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru> References: <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 01/11] net/sfc: rename array of SW stats descriptions 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" From: Ivan Ilchenko Rename global array of SW stats descriptions declared as 'struct sfc_sw_xstat_descr sfc_sw_xstats[]' to 'sfc_sw_stats_descr[]' to avoid ambiguity since there is structure declared as 'struct sfc_sw_xstats'. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_sw_stats.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c index 2b28ba29e6..2b8b1b56e9 100644 --- a/drivers/net/sfc/sfc_sw_stats.c +++ b/drivers/net/sfc/sfc_sw_stats.c @@ -49,7 +49,7 @@ sfc_get_sw_xstat_val_tx_dbells(struct sfc_adapter *sa, uint16_t qid) return 0; } -struct sfc_sw_xstat_descr sfc_sw_xstats[] = { +struct sfc_sw_xstat_descr sfc_sw_stats_descr[] = { { .name = "dbells", .type = SFC_SW_STATS_RX, @@ -334,9 +334,9 @@ sfc_sw_xstats_get_nb_supported(struct sfc_adapter *sa) SFC_ASSERT(sfc_adapter_is_locked(sa)); - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) { + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) { nb_supported += sfc_sw_xstat_get_nb_supported(sa, - &sfc_sw_xstats[i]); + &sfc_sw_stats_descr[i]); } return nb_supported; @@ -357,8 +357,8 @@ sfc_sw_xstats_get_vals(struct sfc_adapter *sa, sw_xstats_offset = *nb_supported; - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) { - sfc_sw_xstat_get_values(sa, &sfc_sw_xstats[i], xstats, + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) { + sfc_sw_xstat_get_values(sa, &sfc_sw_stats_descr[i], xstats, xstats_count, nb_written, nb_supported); } @@ -380,8 +380,8 @@ sfc_sw_xstats_get_names(struct sfc_adapter *sa, sfc_adapter_lock(sa); - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) { - ret = sfc_sw_stat_get_names(sa, &sfc_sw_xstats[i], + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) { + ret = sfc_sw_stat_get_names(sa, &sfc_sw_stats_descr[i], xstats_names, xstats_count, nb_written, nb_supported); if (ret != 0) { @@ -410,8 +410,8 @@ sfc_sw_xstats_get_vals_by_id(struct sfc_adapter *sa, sw_xstats_offset = *nb_supported; - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) { - sfc_sw_xstat_get_values_by_id(sa, &sfc_sw_xstats[i], ids, + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) { + sfc_sw_xstat_get_values_by_id(sa, &sfc_sw_stats_descr[i], ids, values, n, nb_supported); } @@ -435,9 +435,9 @@ sfc_sw_xstats_get_names_by_id(struct sfc_adapter *sa, sfc_adapter_lock(sa); - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) { - ret = sfc_sw_xstat_get_names_by_id(sa, &sfc_sw_xstats[i], ids, - xstats_names, size, + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) { + ret = sfc_sw_xstat_get_names_by_id(sa, &sfc_sw_stats_descr[i], + ids, xstats_names, size, nb_supported); if (ret != 0) { sfc_adapter_unlock(sa); @@ -488,8 +488,8 @@ sfc_sw_xstats_reset(struct sfc_adapter *sa) SFC_ASSERT(sfc_adapter_is_locked(sa)); - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) { - sw_xstat = &sfc_sw_xstats[i]; + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) { + sw_xstat = &sfc_sw_stats_descr[i]; sfc_sw_xstat_reset(sa, sw_xstat, reset_vals); reset_vals += sfc_sw_xstat_get_nb_supported(sa, sw_xstat); } @@ -502,9 +502,9 @@ sfc_sw_xstats_configure(struct sfc_adapter *sa) size_t nb_supported = 0; unsigned int i; - for (i = 0; i < RTE_DIM(sfc_sw_xstats); i++) + for (i = 0; i < RTE_DIM(sfc_sw_stats_descr); i++) nb_supported += sfc_sw_xstat_get_nb_supported(sa, - &sfc_sw_xstats[i]); + &sfc_sw_stats_descr[i]); *reset_vals = rte_realloc(*reset_vals, nb_supported * sizeof(**reset_vals), 0); -- 2.30.2