patch 'net/hns3: fix unchecked Rx free threshold' has been queued to stable release 20.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Nov 8 20:25:08 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.10

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/10/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/83132d1f9f526b0b4446f5f6d918f35631986457

Thanks.

Luca Boccassi

---
>From 83132d1f9f526b0b4446f5f6d918f35631986457 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui at huawei.com>
Date: Fri, 27 Oct 2023 14:09:40 +0800
Subject: [PATCH] net/hns3: fix unchecked Rx free threshold

[ upstream commit c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 ]

To reduce the frequency of updating the head pointer of Rx queue,
driver just updates this pointer when the number of processed
descriptors is greater than the Rx free threshold. If the Rx free
threshold is set to a value greater than or equal to the number of
descriptors in Rx queue, the driver does not update this pointer.
As a result, the hardware cannot receive more packets.

This patch fix it by adding Rx free threshold check.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 963a20627b..e0abcce695 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1788,6 +1788,12 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,
 		return -EINVAL;
 	}
 
+	if (conf->rx_free_thresh >= nb_desc) {
+		hns3_err(hw, "rx_free_thresh (%u) must be less than %u",
+			 conf->rx_free_thresh, nb_desc);
+		return -EINVAL;
+	}
+
 	if (conf->rx_drop_en == 0)
 		hns3_warn(hw, "if no descriptors available, packets are always "
 			  "dropped and rx_drop_en (1) is fixed on");
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-08 19:23:52.445443238 +0000
+++ 0010-net-hns3-fix-unchecked-Rx-free-threshold.patch	2023-11-08 19:23:51.753395878 +0000
@@ -1 +1 @@
-From c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 Mon Sep 17 00:00:00 2001
+From 83132d1f9f526b0b4446f5f6d918f35631986457 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c1f0cd3a4c834c2e550370b6d31b6bcd456a15f9 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index f3c3b38c55..13214d02d5 100644
+index 963a20627b..e0abcce695 100644
@@ -27 +28 @@
-@@ -1785,6 +1785,12 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,
+@@ -1788,6 +1788,12 @@ hns3_rx_queue_conf_check(struct hns3_hw *hw, const struct rte_eth_rxconf *conf,


More information about the stable mailing list