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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Nov 12 23:07:13 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.7

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/14/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From b207e53f2788c4c09f23b0646b242b49f79d51aa 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 da17fa6e69..ec2000064c 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1182,6 +1182,11 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 					  "Tunnel packets must configure "
 					  "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:
 	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-12 22:06:58.796939457 +0000
+++ 0003-net-hns3-restrict-tunnel-flow-rule-to-one-header.patch	2024-11-12 22:06:58.627306574 +0000
@@ -1 +1 @@
-From 8887c207b9373a1875031c5346706f698322d66d Mon Sep 17 00:00:00 2001
+From b207e53f2788c4c09f23b0646b242b49f79d51aa 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 da17fa6e69..ec2000064c 100644
@@ -23 +24 @@
-@@ -1221,6 +1221,11 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -1182,6 +1182,11 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,


More information about the stable mailing list