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 20F6742DA6 for ; Sat, 15 Jul 2023 00:35:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19F8840EDC; Sat, 15 Jul 2023 00:35:14 +0200 (CEST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id E320940DFB for ; Sat, 15 Jul 2023 00:35:12 +0200 (CEST) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3fc03aa6e04so22618995e9.2 for ; Fri, 14 Jul 2023 15:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689374112; x=1691966112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2D2KH6LFYoJdJJ2fcW2TLLXY7IqlRlIMRuAJWxNfegc=; b=ncBQnuFbYvsiOeOuGGuHWaVtLFy0V/WT8NYpoNvj0fdkmLpdFaLXHfQKpMTWiVGEOX LOEdFvKqzZO8lvVF63s9TurG+80p/akGMUMg5W61QOsnm7Vvabe93haS+hvQDVimqed1 8gcN9fWlwU06vbUwA9nffw3JMw3/vPCGqUz1a2Bch9xqswY2dYewPKT8ZQqnpEf+oAPN HNXpHgrsAKfbcS17TIop4ugrNvb/b+4dqSk6UlKMHXulqnF+KJBHn6UK2es0UmP1scGa 5PWmlxHKP286G5v66OwzjFLzxJaCv1YzOGCh2Knq+1YrYKlR0ZKZ86PLTOHldcxlqg3N kKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689374112; x=1691966112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2D2KH6LFYoJdJJ2fcW2TLLXY7IqlRlIMRuAJWxNfegc=; b=iZzUZlrP77HJ0o6E9G9n0SLJ2/3yo2635lqx35Blskn0kOQbDp/AE+axbL2ZoGDtB7 yYis2Yqi1GjSwSCHrjlUPCAnMgars49Huy04ShyCaqZ9Pq8UuriBb0r8JpQbyz7VWZnU CiDMaqJWWbLNV7vp5gX9KjYttttgUSmeIUmxF57UwY4WKDd/EZyg2+e2SBgbha4kc0Ih EGrkrnDCLEq43m7MExP9y9S4O3lbxzcJkt6reHtKXhUgL9LOZQuwA0o7dTRqp705fkbt cLy+Rqt2L5D+xYaFnP58fOVVKiJ30ve/R6DlMwTSr96qa0MpLGneAGRXy5HzMsdY2c73 14tw== X-Gm-Message-State: ABy/qLbRxZyvRJlu/UrtPWx+cOzV107ONxND7VtqUM9SX+QdMALNV9Uc MqhQ0mZpL3/RHsX3ozWgEso/ZRqrGDd4V/8k X-Google-Smtp-Source: APBJJlE5k0s+dnm33/1bv8asTKSkpW61uSXuYmL2MxAGdPaVNyGOi1B+IpDFi4tYI+l5pv3Vpnh3/A== X-Received: by 2002:a1c:730c:0:b0:3fb:b890:128b with SMTP id d12-20020a1c730c000000b003fbb890128bmr4885707wmb.27.1689374112496; Fri, 14 Jul 2023 15:35:12 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id y17-20020a1c4b11000000b003fb739d27aesm2289251wma.35.2023.07.14.15.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 15:35:12 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: fix non-zero weight for disabled TC' has been queued to stable release 20.11.9 Date: Fri, 14 Jul 2023 23:34:35 +0100 Message-Id: <20230714223447.1092828-6-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230714223447.1092828-1-luca.boccassi@gmail.com> References: <20230628141046.2145871-22-luca.boccassi@gmail.com> <20230714223447.1092828-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.9 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/16/23. 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/872463f26324682b132b2cf48a77605e8869f968 Thanks. Luca Boccassi --- >From 872463f26324682b132b2cf48a77605e8869f968 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 7 Jul 2023 18:40:53 +0800 Subject: [PATCH] net/hns3: fix non-zero weight for disabled TC [ upstream commit 1abcdb3f247393a04703071452b560a77ab23c04 ] hns3 PF driver enables one TC, allocates to 100% weight for this TC and 0% for other disabled TC by default. But driver modifies the weight to 1% for disabled TC and then set to hardware to make all TC work in DWRR mode. As a result, the total percent of all TC is more than 100%. Actually, this operation is also redundant, because these disabled TC will never be used. So this patch sets the weight of all TC based on user's configuration. Fixes: 62e3ccc2b94c ("net/hns3: support flow control") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_dcb.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c index a5cfccee28..6f9335a41f 100644 --- a/drivers/net/hns3/hns3_dcb.c +++ b/drivers/net/hns3/hns3_dcb.c @@ -240,9 +240,9 @@ hns3_dcb_qs_weight_cfg(struct hns3_hw *hw, uint16_t qs_id, uint8_t dwrr) static int hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw) { -#define DEFAULT_TC_WEIGHT 1 #define DEFAULT_TC_OFFSET 14 struct hns3_ets_tc_weight_cmd *ets_weight; + struct hns3_pg_info *pg_info; struct hns3_cmd_desc desc; uint8_t i; @@ -250,13 +250,6 @@ hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw) ets_weight = (struct hns3_ets_tc_weight_cmd *)desc.data; for (i = 0; i < HNS3_MAX_TC_NUM; i++) { - struct hns3_pg_info *pg_info; - - ets_weight->tc_weight[i] = DEFAULT_TC_WEIGHT; - - if (!(hw->hw_tc_map & BIT(i))) - continue; - pg_info = &hw->dcb_info.pg_info[hw->dcb_info.tc_info[i].pgid]; ets_weight->tc_weight[i] = pg_info->tc_dwrr[i]; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-14 23:33:08.749298283 +0100 +++ 0006-net-hns3-fix-non-zero-weight-for-disabled-TC.patch 2023-07-14 23:33:08.487305115 +0100 @@ -1 +1 @@ -From 1abcdb3f247393a04703071452b560a77ab23c04 Mon Sep 17 00:00:00 2001 +From 872463f26324682b132b2cf48a77605e8869f968 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1abcdb3f247393a04703071452b560a77ab23c04 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index af045b22f7..07b8c46a81 100644 +index a5cfccee28..6f9335a41f 100644 @@ -27 +28 @@ -@@ -237,9 +237,9 @@ hns3_dcb_qs_weight_cfg(struct hns3_hw *hw, uint16_t qs_id, uint8_t dwrr) +@@ -240,9 +240,9 @@ hns3_dcb_qs_weight_cfg(struct hns3_hw *hw, uint16_t qs_id, uint8_t dwrr) @@ -38 +39 @@ -@@ -247,13 +247,6 @@ hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw) +@@ -250,13 +250,6 @@ hns3_dcb_ets_tc_dwrr_cfg(struct hns3_hw *hw)