From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: dev@dpdk.org
Cc: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 05/11] net/sfc: fix missing const of SW stats descriptions
Date: Tue, 28 Sep 2021 14:29:06 +0300 [thread overview]
Message-ID: <20210928112912.785412-6-andrew.rybchenko@oktetlabs.ru> (raw)
In-Reply-To: <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru>
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Description is a global variable shared by all adapters and must
not be modified.
Fixes: fdd7719eb3c ("net/sfc: add xstats for Rx/Tx doorbells")
Cc: stable@dpdk.org
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 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index c297bb8294..de99e1cfaf 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -49,7 +49,7 @@ sfc_get_sw_stat_val_tx_dbells(struct sfc_adapter *sa, uint16_t qid)
return 0;
}
-struct sfc_sw_stat_descr sfc_sw_stats_descr[] = {
+const struct sfc_sw_stat_descr sfc_sw_stats_descr[] = {
{
.name = "dbells",
.type = SFC_SW_STATS_RX,
@@ -452,7 +452,8 @@ sfc_sw_xstats_get_names_by_id(struct sfc_adapter *sa,
}
static void
-sfc_sw_xstat_reset(struct sfc_adapter *sa, struct sfc_sw_stat_descr *sw_stat,
+sfc_sw_xstat_reset(struct sfc_adapter *sa,
+ const struct sfc_sw_stat_descr *sw_stat,
uint64_t *reset_vals)
{
unsigned int nb_queues;
@@ -483,7 +484,7 @@ void
sfc_sw_xstats_reset(struct sfc_adapter *sa)
{
uint64_t *reset_vals = sa->sw_stats.reset_vals;
- struct sfc_sw_stat_descr *sw_stat;
+ const struct sfc_sw_stat_descr *sw_stat;
unsigned int i;
SFC_ASSERT(sfc_adapter_is_locked(sa));
--
2.30.2
prev parent reply other threads:[~2021-09-28 11:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru>
2021-09-28 11:29 ` [dpdk-stable] [PATCH 04/11] net/sfc: fix cleanup order of SW stats Andrew Rybchenko
2021-09-28 11:29 ` Andrew Rybchenko [this message]
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-6-andrew.rybchenko@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ivan.ilchenko@oktetlabs.ru \
--cc=stable@dpdk.org \
/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).