patch 'common/cnxk: fix schedule weight update' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Fri Nov 11 11:33:23 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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 11/14/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6c158b7c1a7795624a2d5c82d543bc8df1c391ba

Thanks.

Kevin

---
>From 6c158b7c1a7795624a2d5c82d543bc8df1c391ba Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar at marvell.com>
Date: Fri, 14 Oct 2022 11:13:10 +0530
Subject: [PATCH] common/cnxk: fix schedule weight update

[ upstream commit 1669a84d57f1cad4b04822e4c561a40f098275d9 ]

Each TX schedule config mail box supports a maximum 20 register updates.
This patch will send node weight updates in multiple mailboxes when
TM is created with more than 20 scheduler nodes.

Fixes: 464c9f919321 ("common/cnxk: support NIX TM dynamic update")

Signed-off-by: Satha Rao <skoteshwar at marvell.com>
---
 drivers/common/cnxk/roc_nix_tm_ops.c | 60 ++++++++++++++++++----------
 1 file changed, 40 insertions(+), 20 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index 3d81247a12..191bb20558 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -881,17 +881,27 @@ roc_nix_tm_node_parent_update(struct roc_nix *roc_nix, uint32_t node_id,
 			if (sibling->parent != node->parent)
 				continue;
-			k += nix_tm_sw_xoff_prep(sibling, true, &req->reg[k],
-						 &req->regval[k]);
+			k += nix_tm_sw_xoff_prep(sibling, true, &req->reg[k], &req->regval[k]);
+			if (k >= MAX_REGS_PER_MBOX_MSG) {
+				req->num_regs = k;
+				rc = mbox_process(mbox);
+				if (rc)
+					return rc;
+				k = 0;
+				req = mbox_alloc_msg_nix_txschq_cfg(mbox);
+				req->lvl = node->hw_lvl;
+			}
+		}
+
+		if (k) {
+			req->num_regs = k;
+			rc = mbox_process(mbox);
+			if (rc)
+				return rc;
+			/* Update new weight for current node */
+			req = mbox_alloc_msg_nix_txschq_cfg(mbox);
 		}
-		req->num_regs = k;
-		rc = mbox_process(mbox);
-		if (rc)
-			return rc;
 
-		/* Update new weight for current node */
-		req = mbox_alloc_msg_nix_txschq_cfg(mbox);
 		req->lvl = node->hw_lvl;
-		req->num_regs =
-			nix_tm_sched_reg_prep(nix, node, req->reg, req->regval);
+		req->num_regs = nix_tm_sched_reg_prep(nix, node, req->reg, req->regval);
 		rc = mbox_process(mbox);
 		if (rc)
@@ -906,17 +916,27 @@ roc_nix_tm_node_parent_update(struct roc_nix *roc_nix, uint32_t node_id,
 			if (sibling->parent != node->parent)
 				continue;
-			k += nix_tm_sw_xoff_prep(sibling, false, &req->reg[k],
-						 &req->regval[k]);
+			k += nix_tm_sw_xoff_prep(sibling, false, &req->reg[k], &req->regval[k]);
+			if (k >= MAX_REGS_PER_MBOX_MSG) {
+				req->num_regs = k;
+				rc = mbox_process(mbox);
+				if (rc)
+					return rc;
+				k = 0;
+				req = mbox_alloc_msg_nix_txschq_cfg(mbox);
+				req->lvl = node->hw_lvl;
+			}
+		}
+
+		if (k) {
+			req->num_regs = k;
+			rc = mbox_process(mbox);
+			if (rc)
+				return rc;
+			/* XON Parent node */
+			req = mbox_alloc_msg_nix_txschq_cfg(mbox);
 		}
-		req->num_regs = k;
-		rc = mbox_process(mbox);
-		if (rc)
-			return rc;
 
-		/* XON Parent node */
-		req = mbox_alloc_msg_nix_txschq_cfg(mbox);
 		req->lvl = node->parent->hw_lvl;
-		req->num_regs = nix_tm_sw_xoff_prep(node->parent, false,
-						    req->reg, req->regval);
+		req->num_regs = nix_tm_sw_xoff_prep(node->parent, false, req->reg, req->regval);
 		rc = mbox_process(mbox);
 		if (rc)
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-11 10:32:17.857746574 +0000
+++ 0033-common-cnxk-fix-schedule-weight-update.patch	2022-11-11 10:32:17.094300849 +0000
@@ -1 +1 @@
-From 1669a84d57f1cad4b04822e4c561a40f098275d9 Mon Sep 17 00:00:00 2001
+From 6c158b7c1a7795624a2d5c82d543bc8df1c391ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1669a84d57f1cad4b04822e4c561a40f098275d9 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -15 +15,0 @@
- drivers/common/cnxk/roc_nix_queue.c  |  2 +-
@@ -17 +17 @@
- 2 files changed, 41 insertions(+), 21 deletions(-)
+ 1 file changed, 40 insertions(+), 20 deletions(-)
@@ -19,11 +18,0 @@
-diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
-index 368f1a52f7..7318f26b57 100644
---- a/drivers/common/cnxk/roc_nix_queue.c
-+++ b/drivers/common/cnxk/roc_nix_queue.c
-@@ -917,5 +917,5 @@ sqb_pool_populate(struct roc_nix *roc_nix, struct roc_nix_sq *sq)
- 	/* Clamp up the SQB count */
- 	nb_sqb_bufs = PLT_MIN(roc_nix->max_sqb_count,
--			      PLT_MAX(NIX_DEF_SQB, nb_sqb_bufs));
-+			      (uint16_t)PLT_MAX(NIX_DEF_SQB, nb_sqb_bufs));
- 
- 	sq->nb_sqb_bufs = nb_sqb_bufs;
@@ -31 +20 @@
-index 7036495ad8..4bf7b1e104 100644
+index 3d81247a12..191bb20558 100644
@@ -34 +23 @@
-@@ -892,17 +892,27 @@ roc_nix_tm_node_parent_update(struct roc_nix *roc_nix, uint32_t node_id,
+@@ -881,17 +881,27 @@ roc_nix_tm_node_parent_update(struct roc_nix *roc_nix, uint32_t node_id,
@@ -72 +61 @@
-@@ -917,17 +927,27 @@ roc_nix_tm_node_parent_update(struct roc_nix *roc_nix, uint32_t node_id,
+@@ -906,17 +916,27 @@ roc_nix_tm_node_parent_update(struct roc_nix *roc_nix, uint32_t node_id,



More information about the stable mailing list