[dpdk-stable] patch 'net/octeontx2: fix TM node statistics query' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:52:35 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f58d25a57902f39e49a7b4c2d37750238804f1a5

Thanks.

Luca Boccassi

---
>From f58d25a57902f39e49a7b4c2d37750238804f1a5 Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar at marvell.com>
Date: Wed, 7 Jul 2021 12:49:16 -0400
Subject: [PATCH] net/octeontx2: fix TM node statistics query

[ upstream commit d9dda782ac08a47ca092a0c499b21635b23e6644 ]

Until hierarchy committed TM hardware resources are not allocated
for node.
This patch check for status of HW resources before reading statistics.

Fixes: 1e25d57fae38 ("net/octeontx2: add TM stats and shaper profile")

Signed-off-by: Satha Rao <skoteshwar at marvell.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/net/octeontx2/otx2_tm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c
index fdd56697f1..6aff1f9587 100644
--- a/drivers/net/octeontx2/otx2_tm.c
+++ b/drivers/net/octeontx2/otx2_tm.c
@@ -2769,6 +2769,12 @@ otx2_nix_tm_node_stats_read(struct rte_eth_dev *eth_dev, uint32_t node_id,
 		return -EINVAL;
 	}
 
+	if (!(tm_node->flags & NIX_TM_NODE_HWRES)) {
+		error->type = RTE_TM_ERROR_TYPE_NODE_ID;
+		error->message = "HW resources not allocated";
+		return -EINVAL;
+	}
+
 	/* Stats support only for leaf node or TL1 root */
 	if (nix_tm_is_leaf(dev, tm_node->lvl)) {
 		reg = (((uint64_t)tm_node->id) << 32);
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:16.537718968 +0100
+++ 0012-net-octeontx2-fix-TM-node-statistics-query.patch	2021-07-26 13:53:15.813291866 +0100
@@ -1 +1 @@
-From d9dda782ac08a47ca092a0c499b21635b23e6644 Mon Sep 17 00:00:00 2001
+From f58d25a57902f39e49a7b4c2d37750238804f1a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9dda782ac08a47ca092a0c499b21635b23e6644 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list