patch 'net/hns3: enable PFC for all user priorities' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:49:17 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/15/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=cadb90f7119a2b3e45df919f941feab9029fe92f

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From cadb90f7119a2b3e45df919f941feab9029fe92f Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1 at huawei.com>
Date: Wed, 6 Mar 2024 17:20:47 +0800
Subject: [PATCH] net/hns3: enable PFC for all user priorities
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit aae6989df36c105b917cf69975c075dfde2e6b84 ]

When user set TC number to 4 and enable PFC and ETS by dev_configure,
driver only enable user priority 0-3.
The packet with user priority 4-7 cannot trigger PFC frame.

Fix by enabling PFC for all user priorities.

By the way, the nb_tcs from user can never be 0 because of the ahead
check in driver. So remove this redundant code.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Jie Hai <haijie1 at huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 2831d3dc62..915e4eb768 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1499,7 +1499,6 @@ hns3_dcb_info_update(struct hns3_adapter *hns, uint8_t num_tc)
 static int
 hns3_dcb_hw_configure(struct hns3_adapter *hns)
 {
-	struct rte_eth_dcb_rx_conf *dcb_rx_conf;
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
 	enum hns3_fc_status fc_status = hw->current_fc_status;
@@ -1519,12 +1518,8 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 	}
 
 	if (hw->data->dev_conf.dcb_capability_en & RTE_ETH_DCB_PFC_SUPPORT) {
-		dcb_rx_conf = &hw->data->dev_conf.rx_adv_conf.dcb_rx_conf;
-		if (dcb_rx_conf->nb_tcs == 0)
-			hw->dcb_info.pfc_en = 1; /* tc0 only */
-		else
-			hw->dcb_info.pfc_en =
-			RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
+		hw->dcb_info.pfc_en =
+			RTE_LEN2MASK((uint8_t)HNS3_MAX_USER_PRIO, uint8_t);
 
 		hw->dcb_info.hw_pfc_map =
 				hns3_dcb_undrop_tc_map(hw, hw->dcb_info.pfc_en);
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:07.358308448 +0800
+++ 0077-net-hns3-enable-PFC-for-all-user-priorities.patch	2024-04-13 20:43:05.027753892 +0800
@@ -1 +1 @@
-From aae6989df36c105b917cf69975c075dfde2e6b84 Mon Sep 17 00:00:00 2001
+From cadb90f7119a2b3e45df919f941feab9029fe92f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit aae6989df36c105b917cf69975c075dfde2e6b84 ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list