From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 045E7A0542 for ; Fri, 11 Nov 2022 11:34:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0005840150; Fri, 11 Nov 2022 11:34:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7711B4014F for ; Fri, 11 Nov 2022 11:34:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668162896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=96a/5SvhNvty4W69a4ldJy3o8zB2Fh9OdfwEgbG5G/8=; b=eCkWGN+yJTef1+rNGcve1oYphzpSdsrz5WKrzOzvQw1s0kA9XBsX2VgBXCO4bLw5aQqi27 8U6kI9VAWUNZLSX5mwZyvL158E14fk+GxKQgIUy4R8ugsQU29HXEwoakXZA4O9N1/HCAwd WKzEJ8bsNuoCuLUpNxjxQXZj4aqPBJk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-453-kyggBA-PMOO1yF_hjC-pcA-1; Fri, 11 Nov 2022 05:34:53 -0500 X-MC-Unique: kyggBA-PMOO1yF_hjC-pcA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 63E9D3850E81; Fri, 11 Nov 2022 10:34:53 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92D87200BA64; Fri, 11 Nov 2022 10:34:52 +0000 (UTC) From: Kevin Traynor To: Satha Rao Cc: dpdk stable Subject: patch 'common/cnxk: fix schedule weight update' has been queued to stable release 21.11.3 Date: Fri, 11 Nov 2022 10:33:23 +0000 Message-Id: <20221111103337.307408-33-ktraynor@redhat.com> In-Reply-To: <20221111103337.307408-1-ktraynor@redhat.com> References: <20221111103337.307408-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 --- 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@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,