[PATCH v2] net/ice: detect L2TPv2 tunnel type in pre-scan loop

Shaiq Wani shaiq.wani at intel.com
Thu Apr 9 07:18:34 CEST 2026


The pre-scan in ice_fdir_parse_pattern() recognises VXLAN and
GTPU items but not L2TPV2.  When an L2TPv2 item is present, tunnel_type
stays NONE, so the ETH item handler stores MAC addresses in the inner
ext_data struct instead of ext_data_outer resulting in rule not matching.

Add ICE_FDIR_TUNNEL_TYPE_L2TPV2 detection alongside the existing VXLAN
check.

Fixes: 733640dae75e ("net/ice: support L2TPv2 flow pattern matching")
Signed-off-by: Shaiq Wani <shaiq.wani at intel.com>
---
v2:
- Split from combined outer-MAC patch into separate fix (review feedback).

 drivers/net/intel/ice/ice_fdir_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
index 3522d77123..1cbc613020 100644
--- a/drivers/net/intel/ice/ice_fdir_filter.c
+++ b/drivers/net/intel/ice/ice_fdir_filter.c
@@ -1911,6 +1911,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
 	for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
 		if (item->type == RTE_FLOW_ITEM_TYPE_VXLAN)
 			tunnel_type = ICE_FDIR_TUNNEL_TYPE_VXLAN;
+		if (item->type == RTE_FLOW_ITEM_TYPE_L2TPV2)
+			tunnel_type = ICE_FDIR_TUNNEL_TYPE_L2TPV2;
 		/* To align with shared code behavior, save gtpu outer
 		 * fields in inner struct.
 		 */
-- 
2.43.0



More information about the dev mailing list