patch 'net/hns3: restrict tunnel flow rule to one header' has been queued to stable release 21.11.9

Kevin Traynor ktraynor at redhat.com
Wed Nov 27 18:18:18 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.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 12/02/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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f5cfbef2f053f1cf33fa2fd0112724660c9efa0e

Thanks.

Kevin

---
>From f5cfbef2f053f1cf33fa2fd0112724660c9efa0e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 18 Oct 2024 14:19:38 +0800
Subject: [PATCH] net/hns3: restrict tunnel flow rule to one header

[ upstream commit 8887c207b9373a1875031c5346706f698322d66d ]

The device's flow director supports a maximum of one tunnel header, if
passed more than one tunnel header from rte-flow API, the driver should
return error.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Jie Hai <haijie1 at huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 74b08451e1..4d0d17f991 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1136,4 +1136,9 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 					  "with mask");
 
+	if (rule->key_conf.spec.tunnel_type != 0)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM,
+					  item, "Too many tunnel headers!");
+
 	switch (item->type) {
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
-- 
2.47.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 17:17:40.496179625 +0000
+++ 0071-net-hns3-restrict-tunnel-flow-rule-to-one-header.patch	2024-11-27 17:17:38.265269580 +0000
@@ -1 +1 @@
-From 8887c207b9373a1875031c5346706f698322d66d Mon Sep 17 00:00:00 2001
+From f5cfbef2f053f1cf33fa2fd0112724660c9efa0e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8887c207b9373a1875031c5346706f698322d66d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index bf1eee506d..5586708a5d 100644
+index 74b08451e1..4d0d17f991 100644
@@ -23 +24 @@
-@@ -1222,4 +1222,9 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -1136,4 +1136,9 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,



More information about the stable mailing list