patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 04/11] net/sfc: fix cleanup order of SW stats
       [not found] <20210928112912.785412-1-andrew.rybchenko@oktetlabs.ru>
@ 2021-09-28 11:29 ` Andrew Rybchenko
  2021-09-28 11:29 ` [dpdk-stable] [PATCH 05/11] net/sfc: fix missing const of SW stats descriptions Andrew Rybchenko
  1 sibling, 0 replies; 2+ messages in thread
From: Andrew Rybchenko @ 2021-09-28 11:29 UTC (permalink / raw)
  To: dev; +Cc: Ivan Ilchenko, stable

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

Fix cleanup order of SW stats structures to be reversed
to initialization order.

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_sw_stats.c b/drivers/net/sfc/sfc_sw_stats.c
index 108f301822..c297bb8294 100644
--- a/drivers/net/sfc/sfc_sw_stats.c
+++ b/drivers/net/sfc/sfc_sw_stats.c
@@ -566,8 +566,7 @@ sfc_sw_xstats_init(struct sfc_adapter *sa)
 void
 sfc_sw_xstats_close(struct sfc_adapter *sa)
 {
+	sfc_sw_xstats_free_queues_bitmap(sa);
 	rte_free(sa->sw_stats.reset_vals);
 	sa->sw_stats.reset_vals = NULL;
-
-	sfc_sw_xstats_free_queues_bitmap(sa);
 }
-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-stable] [PATCH 05/11] net/sfc: fix missing const of SW stats descriptions
       [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
  1 sibling, 0 replies; 2+ messages in thread
From: Andrew Rybchenko @ 2021-09-28 11:29 UTC (permalink / raw)
  To: dev; +Cc: Ivan Ilchenko, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-28 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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 ` [dpdk-stable] [PATCH 05/11] net/sfc: fix missing const of SW stats descriptions Andrew Rybchenko

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git