patch 'net/i40e: fix VLAN flow mask validation' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 23 19:14:59 CEST 2026


Hi,

FYI, your patch has been queued to stable release 25.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/27/26. 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/becf95cf8ba4f3542f8952592f4f1a1ccce020a3

Thanks.

Kevin

---
>From becf95cf8ba4f3542f8952592f4f1a1ccce020a3 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus at intel.com>
Date: Mon, 23 Mar 2026 10:43:45 +0000
Subject: [PATCH] net/i40e: fix VLAN flow mask validation

[ upstream commit 7cc6fd2d7116487d5fe589c7f18ad6d5614077f2 ]

Currently, the i40e flow validation logic accepts some partial VLAN TCI
masks alongside the full mask, and reports an error for any other value.
This is broken in two ways.

First, the error case is not handled correctly. An error is recorded
however execution continues as normal, and a filter is programmed using
the invalid mask, silently producing wrong matching behaviour.

Second, the hardware always compares the full 16-bit TCI field with no
per-bit masking. Partial masks are therefore not honoured and should not
be accepted.

Fix this by accepting only either a wildcard or exact match mask and
handle the invalid mask cases appropriately.

Bugzilla ID: 1340
Fixes: 81aebb47d189 ("net/i40e: fix flow director for eth + VLAN pattern")

Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/i40e/i40e_flow.c | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/net/intel/i40e/i40e_flow.c b/drivers/net/intel/i40e/i40e_flow.c
index 420d983c86..df775b479c 100644
--- a/drivers/net/intel/i40e/i40e_flow.c
+++ b/drivers/net/intel/i40e/i40e_flow.c
@@ -30,7 +30,4 @@
 #define I40E_TENANT_ARRAY_NUM	3
 #define I40E_VLAN_TCI_MASK	0xFFFF
-#define I40E_VLAN_PRI_MASK	0xE000
-#define I40E_VLAN_CFI_MASK	0x1000
-#define I40E_VLAN_VID_MASK	0x0FFF
 
 static int i40e_flow_validate(struct rte_eth_dev *dev,
@@ -1771,20 +1768,17 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 			RTE_ASSERT(!(input_set & I40E_INSET_LAST_ETHER_TYPE));
 			if (vlan_spec && vlan_mask) {
-				if (vlan_mask->hdr.vlan_tci !=
-				    rte_cpu_to_be_16(I40E_VLAN_TCI_MASK) &&
+				if (vlan_mask->hdr.vlan_tci != 0 &&
 				    vlan_mask->hdr.vlan_tci !=
-				    rte_cpu_to_be_16(I40E_VLAN_PRI_MASK) &&
-				    vlan_mask->hdr.vlan_tci !=
-				    rte_cpu_to_be_16(I40E_VLAN_CFI_MASK) &&
-				    vlan_mask->hdr.vlan_tci !=
-				    rte_cpu_to_be_16(I40E_VLAN_VID_MASK)) {
+				    rte_cpu_to_be_16(I40E_VLAN_TCI_MASK)) {
 					rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
 						   item,
 						   "Unsupported TCI mask.");
+					return -rte_errno;
+				}
+				if (vlan_mask->hdr.vlan_tci != 0) {
+					input_set |= I40E_INSET_VLAN_INNER;
+					filter->input.flow_ext.vlan_tci = vlan_spec->hdr.vlan_tci;
 				}
-				input_set |= I40E_INSET_VLAN_INNER;
-				filter->input.flow_ext.vlan_tci =
-					vlan_spec->hdr.vlan_tci;
 			}
 			if (vlan_spec && vlan_mask && vlan_mask->hdr.eth_proto) {
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-23 17:57:59.704477937 +0100
+++ 0036-net-i40e-fix-VLAN-flow-mask-validation.patch	2026-07-23 17:57:58.647279336 +0100
@@ -1 +1 @@
-From 7cc6fd2d7116487d5fe589c7f18ad6d5614077f2 Mon Sep 17 00:00:00 2001
+From becf95cf8ba4f3542f8952592f4f1a1ccce020a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7cc6fd2d7116487d5fe589c7f18ad6d5614077f2 ]
+
@@ -23 +24,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 78191a2d22..967af052ff 100644
+index 420d983c86..df775b479c 100644
@@ -35 +36 @@
-@@ -31,7 +31,4 @@
+@@ -30,7 +30,4 @@
@@ -43 +44 @@
-@@ -1766,20 +1763,17 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -1771,20 +1768,17 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,



More information about the stable mailing list