DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: dev@dpdk.org
Cc: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH 01/11] net/sfc: rename array of SW stats descriptions
Date: Tue, 28 Sep 2021 14:29:02 +0300	[thread overview]
Message-ID: <20210928112912.785412-2-andrew.rybchenko@oktetlabs.ru> (raw)
In-Reply-To: <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru>

From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>

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 <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 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


  reply	other threads:[~2021-09-28 11:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 11:29 [dpdk-dev] [PATCH 00/11] net/sfc: support per-queue stats on EF100 Andrew Rybchenko
2021-09-28 11:29 ` Andrew Rybchenko [this message]
2021-09-28 11:29 ` [dpdk-dev] [PATCH 02/11] net/sfc: rename accumulative SW stats to total Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 03/11] net/sfc: rename SW stats structures Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 04/11] net/sfc: fix cleanup order of SW stats Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 05/11] net/sfc: fix missing const of SW stats descriptions Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 06/11] net/sfc: optimize getting number of SW stats Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 07/11] net/sfc: prepare having no some SW stats on an adapter Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 08/11] net/sfc: add toggle to disable total stat Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 09/11] net/sfc: add support for SW stats groups Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 10/11] net/sfc: collect per queue stats in EF100 Rx datapath Andrew Rybchenko
2021-09-28 11:29 ` [dpdk-dev] [PATCH 11/11] net/sfc: collect per queue stats in EF100 Tx datapath Andrew Rybchenko
2021-10-11 16:38 ` [dpdk-dev] [PATCH 00/11] net/sfc: support per-queue stats on EF100 Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210928112912.785412-2-andrew.rybchenko@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ivan.ilchenko@oktetlabs.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).