[PATCH 14/19] net/txgbe: fix FDIR rule raw relative for L3 packets

Jiawen Wu jiawenwu at trustnetic.com
Mon Oct 27 04:15:37 CET 2025


Hardware supports FDIR flex field base setting from start of MAC header,
IP header, L4 header, L4 payload. So for IP packet which has no L4 header,
it cannot match the raw bytes with relative offset start from L3 payload.
And FDIR flex bytes rule cannot match L2 packets.

Therefore, we will declare that the relative offset is only used for
matching the L4 packets.

Fixes: aa4974765499 ("net/txgbe: fix raw pattern match for FDIR rule")
Cc: stable at dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
 drivers/net/txgbe/txgbe_fdir.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index 77d0cc4c30..8d181db33f 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -258,10 +258,7 @@ txgbe_fdir_get_flex_base(struct txgbe_fdir_rule *rule)
 	if (rule->input.flow_type & TXGBE_ATR_L4TYPE_MASK)
 		return TXGBE_FDIRFLEXCFG_BASE_PAY;
 
-	if (rule->input.flow_type & TXGBE_ATR_L3TYPE_MASK)
-		return TXGBE_FDIRFLEXCFG_BASE_L3;
-
-	return TXGBE_FDIRFLEXCFG_BASE_L2;
+	return TXGBE_FDIRFLEXCFG_BASE_L3;
 }
 
 int
-- 
2.48.1



More information about the stable mailing list