[dpdk-stable] patch 'net/hns3: fix crash with multi-TC' has been queued to stable release 19.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Nov 25 10:02:51 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.6
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/26/20. 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/aac4e6358e85bc07029b236d419a9258e358e103
Thanks.
Luca Boccassi
---
>From aac4e6358e85bc07029b236d419a9258e358e103 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Fri, 20 Nov 2020 19:27:33 +0800
Subject: [PATCH] net/hns3: fix crash with multi-TC
[ upstream commit 1c359bae182fc64b30fda3777a6c8f8cad7823ab ]
The HW and SW DCB configurations need to be updated only
after the DCB configuration information changed. But the
change of tx/rx queue number is ignored. If user decreases
the number of tx queue after configuring multi-TC, the queue
mapping information in hns3_tc_queue_info can not be updated.
And then accessing the released queue resource in
"hns3_init_tx_ring_tc" will trigger a segment fault.
Fixes: 62e3ccc2b94c ("net/hns3: support flow control")
Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Lijun Ou <oulijun at huawei.com>
---
drivers/net/hns3/hns3_dcb.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index f7d21ca756..62d8930c15 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1258,6 +1258,8 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
{
struct rte_eth_dcb_rx_conf *dcb_rx_conf;
struct hns3_hw *hw = &hns->hw;
+ uint16_t nb_rx_q = hw->data->nb_rx_queues;
+ uint16_t nb_tx_q = hw->data->nb_tx_queues;
uint8_t max_tc = 0;
uint8_t pfc_en;
int i;
@@ -1283,6 +1285,10 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
pfc_en = RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
if (hw->dcb_info.pfc_en != pfc_en)
*changed = true;
+
+ /* tx/rx queue number is reconfigured. */
+ if (nb_rx_q != hw->used_rx_queues || nb_tx_q != hw->used_tx_queues)
+ *changed = true;
}
static void
--
2.27.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-11-24 16:50:36.949566441 +0000
+++ 0009-net-hns3-fix-crash-with-multi-TC.patch 2020-11-24 16:50:36.565496231 +0000
@@ -1 +1 @@
-From 1c359bae182fc64b30fda3777a6c8f8cad7823ab Mon Sep 17 00:00:00 2001
+From aac4e6358e85bc07029b236d419a9258e358e103 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c359bae182fc64b30fda3777a6c8f8cad7823ab ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index ab02c87628..fb501795f0 100644
+index f7d21ca756..62d8930c15 100644
@@ -27 +28 @@
-@@ -1351,6 +1351,8 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
+@@ -1258,6 +1258,8 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
@@ -36 +37 @@
-@@ -1376,6 +1378,10 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
+@@ -1283,6 +1285,10 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
@@ -46 +47 @@
- static int
+ static void
More information about the stable
mailing list