* [PATCH v1] net/ice: fix FDIR flow type for tunnel inner items
@ 2026-03-23 2:54 Shaiq Wani
2026-03-25 15:12 ` Bruce Richardson
0 siblings, 1 reply; 2+ messages in thread
From: Shaiq Wani @ 2026-03-23 2:54 UTC (permalink / raw)
To: dev, bruce.richardson, aman.deep.singh
The inner_l3/inner_l4 tracking was introduced to handle L2TPv2 tunnel
inner protocols separately from outer ones. However, the conditions used
to branch into the inner tracking than specifically L2TPv2 tunnels.
This caused VXLAN and GTPU FDIR rules with inner L3/L4 items to fail
because the inner IPv4/IPv6/TCP/UDP/SCTP items no longer updated
flow_type and l3, resulting in stale flow_type values.
Fix by narrowing the inner protocol tracking conditions to only apply
when tunnel_type is ICE_FDIR_TUNNEL_TYPE_L2TPV2.
Fixes: 733640dae75e ("net/ice: support L2TPv2 flow pattern matching")
Signed-off-by: Shaiq Wani <shaiq.wani@intel.com>
---
drivers/net/intel/ice/ice_fdir_filter.c | 34 ++++++++++++-------------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
index 5b27f5a077..3522d77123 100644
--- a/drivers/net/intel/ice/ice_fdir_filter.c
+++ b/drivers/net/intel/ice/ice_fdir_filter.c
@@ -2094,13 +2094,13 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
ð_spec->hdr.ether_type, sizeof(eth_spec->hdr.ether_type));
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
- /* Only set flow_type for outer IPv4, track inner L3 for tunnels */
- if (is_outer || !tunnel_type) {
- flow_type = ICE_FLTR_PTYPE_NONF_IPV4_OTHER;
- l3 = RTE_FLOW_ITEM_TYPE_IPV4;
+ if (!is_outer &&
+ tunnel_type == ICE_FDIR_TUNNEL_TYPE_L2TPV2) {
+ inner_l3 = RTE_FLOW_ITEM_TYPE_IPV4;
current_l3 = RTE_FLOW_ITEM_TYPE_IPV4;
} else {
- inner_l3 = RTE_FLOW_ITEM_TYPE_IPV4;
+ flow_type = ICE_FLTR_PTYPE_NONF_IPV4_OTHER;
+ l3 = RTE_FLOW_ITEM_TYPE_IPV4;
current_l3 = RTE_FLOW_ITEM_TYPE_IPV4;
}
@@ -2203,12 +2203,13 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
- if (is_outer || !tunnel_type) {
- flow_type = ICE_FLTR_PTYPE_NONF_IPV6_OTHER;
- l3 = RTE_FLOW_ITEM_TYPE_IPV6;
+ if (!is_outer &&
+ tunnel_type == ICE_FDIR_TUNNEL_TYPE_L2TPV2) {
+ inner_l3 = RTE_FLOW_ITEM_TYPE_IPV6;
current_l3 = RTE_FLOW_ITEM_TYPE_IPV6;
} else {
- inner_l3 = RTE_FLOW_ITEM_TYPE_IPV6;
+ flow_type = ICE_FLTR_PTYPE_NONF_IPV6_OTHER;
+ l3 = RTE_FLOW_ITEM_TYPE_IPV6;
current_l3 = RTE_FLOW_ITEM_TYPE_IPV6;
}
@@ -2294,11 +2295,10 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
break;
case RTE_FLOW_ITEM_TYPE_TCP:
- if (!is_outer && tunnel_type) {
- /* For inner TCP in tunnels, track inner_l4 */
+ if (!is_outer &&
+ tunnel_type == ICE_FDIR_TUNNEL_TYPE_L2TPV2) {
inner_l4 = RTE_FLOW_ITEM_TYPE_TCP;
} else {
- /* For outer TCP, update flow_type normally */
if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
flow_type = ICE_FLTR_PTYPE_NONF_IPV4_TCP;
if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
@@ -2361,11 +2361,10 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
break;
case RTE_FLOW_ITEM_TYPE_UDP:
- if (!is_outer && tunnel_type) {
- /* For inner UDP in tunnels, track inner_l4 */
+ if (!is_outer &&
+ tunnel_type == ICE_FDIR_TUNNEL_TYPE_L2TPV2) {
inner_l4 = RTE_FLOW_ITEM_TYPE_UDP;
} else {
- /* For outer UDP, update flow_type normally */
l4 = RTE_FLOW_ITEM_TYPE_UDP;
if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
flow_type = ICE_FLTR_PTYPE_NONF_IPV4_UDP;
@@ -2424,11 +2423,10 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
break;
case RTE_FLOW_ITEM_TYPE_SCTP:
- if (!is_outer && tunnel_type) {
- /* For inner SCTP in tunnels, track inner_l4 */
+ if (!is_outer &&
+ tunnel_type == ICE_FDIR_TUNNEL_TYPE_L2TPV2) {
inner_l4 = RTE_FLOW_ITEM_TYPE_SCTP;
} else {
- /* For outer SCTP, update flow_type normally */
if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
flow_type = ICE_FLTR_PTYPE_NONF_IPV4_SCTP;
if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v1] net/ice: fix FDIR flow type for tunnel inner items
2026-03-23 2:54 [PATCH v1] net/ice: fix FDIR flow type for tunnel inner items Shaiq Wani
@ 2026-03-25 15:12 ` Bruce Richardson
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2026-03-25 15:12 UTC (permalink / raw)
To: Shaiq Wani; +Cc: dev, aman.deep.singh
On Mon, Mar 23, 2026 at 08:24:18AM +0530, Shaiq Wani wrote:
> The inner_l3/inner_l4 tracking was introduced to handle L2TPv2 tunnel
> inner protocols separately from outer ones. However, the conditions used
> to branch into the inner tracking than specifically L2TPv2 tunnels.
>
> This caused VXLAN and GTPU FDIR rules with inner L3/L4 items to fail
> because the inner IPv4/IPv6/TCP/UDP/SCTP items no longer updated
> flow_type and l3, resulting in stale flow_type values.
>
> Fix by narrowing the inner protocol tracking conditions to only apply
> when tunnel_type is ICE_FDIR_TUNNEL_TYPE_L2TPV2.
>
> Fixes: 733640dae75e ("net/ice: support L2TPv2 flow pattern matching")
>
> Signed-off-by: Shaiq Wani <shaiq.wani@intel.com>
> ---
> drivers/net/intel/ice/ice_fdir_filter.c | 34 ++++++++++++-------------
> 1 file changed, 16 insertions(+), 18 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-25 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 2:54 [PATCH v1] net/ice: fix FDIR flow type for tunnel inner items Shaiq Wani
2026-03-25 15:12 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox