patch 'net/ice: fix L2TPv2 outer MAC in training packet' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 23 19:15:03 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/271b091f4c217513fd45b72f3163603bf9efca6a

Thanks.

Kevin

---
>From 271b091f4c217513fd45b72f3163603bf9efca6a Mon Sep 17 00:00:00 2001
From: Shaiq Wani <shaiq.wani at intel.com>
Date: Thu, 9 Apr 2026 13:14:41 +0530
Subject: [PATCH] net/ice: fix L2TPv2 outer MAC in training packet
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 43739cd2c56a89d24e10fb58c1a403e75cc0d3f1 ]

In ice_fdir_get_gen_prgm_pkt() there are two pointers into the
training-packet buffer:

pkt  – start of the full packet (outer Ethernet header, offset 0)
loc  – start of the current protocol segment; equals pkt for
       non-tunnel flows but points past the tunnel header for
       tunnel flows

The L2TPv2 cases wrote the outer source and destination MAC addresses
through loc.  For non-tunnel L2TPv2, loc == pkt so this happened to
work, but it is semantically wrong: outer Ethernet fields must always
be written relative to pkt so the code remains correct regardless of
the tunnel/non-tunnel path taken.

Replace loc with pkt in the four L2TPv2 MAC-insertion case blocks
(IPv4 control, IPv4 data/PPP, IPv6 control, IPv6 data/PPP)

Fixes: bf662653976e ("net/ice/base: support L2TPv2 flow rule")

Signed-off-by: Shaiq Wani <shaiq.wani at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/ice/base/ice_fdir.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/intel/ice/base/ice_fdir.c b/drivers/net/intel/ice/base/ice_fdir.c
index f62313c559..935fd7e395 100644
--- a/drivers/net/intel/ice/base/ice_fdir.c
+++ b/drivers/net/intel/ice/base/ice_fdir.c
@@ -3836,4 +3836,10 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	u16 offset;
 
+	/* pkt  = start of full packet buffer (outer Ethernet header, offset 0).
+	 * loc  = start of current protocol segment; equals pkt for non-tunnel
+	 *        flows, but points past the tunnel header for tunnel flows.
+	 * Use pkt for outer L2 fields, loc for the active segment.
+	 */
+
 	if (input->flow_type == ICE_FLTR_PTYPE_NONF_IPV4_OTHER) {
 		switch (input->ip.v4.proto) {
@@ -4594,6 +4600,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 		break;
 	case ICE_FLTR_PTYPE_NONF_IPV4_L2TPV2_CONTROL:
-		ice_pkt_insert_mac_addr(loc, input->ext_data_outer.dst_mac);
-		ice_pkt_insert_mac_addr(loc + ETH_ALEN,
+		ice_pkt_insert_mac_addr(pkt, input->ext_data_outer.dst_mac);
+		ice_pkt_insert_mac_addr(pkt + ETH_ALEN,
 					input->ext_data_outer.src_mac);
 		ice_pkt_insert_u16(loc, ICE_IPV4_L2TPV2_LEN_SESS_ID_OFFSET,
@@ -4602,6 +4608,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	case ICE_FLTR_PTYPE_NONF_IPV4_L2TPV2:
 	case ICE_FLTR_PTYPE_NONF_IPV4_L2TPV2_PPP:
-		ice_pkt_insert_mac_addr(loc, input->ext_data_outer.dst_mac);
-		ice_pkt_insert_mac_addr(loc + ETH_ALEN,
+		ice_pkt_insert_mac_addr(pkt, input->ext_data_outer.dst_mac);
+		ice_pkt_insert_mac_addr(pkt + ETH_ALEN,
 					input->ext_data_outer.src_mac);
 		flags_version = BE16_TO_CPU(input->l2tpv2_data.flags_version);
@@ -4617,6 +4623,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 		break;
 	case ICE_FLTR_PTYPE_NONF_IPV6_L2TPV2_CONTROL:
-		ice_pkt_insert_mac_addr(loc, input->ext_data_outer.dst_mac);
-		ice_pkt_insert_mac_addr(loc + ETH_ALEN,
+		ice_pkt_insert_mac_addr(pkt, input->ext_data_outer.dst_mac);
+		ice_pkt_insert_mac_addr(pkt + ETH_ALEN,
 					input->ext_data_outer.src_mac);
 		ice_pkt_insert_u16(loc, ICE_IPV6_L2TPV2_LEN_SESS_ID_OFFSET,
@@ -4625,6 +4631,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	case ICE_FLTR_PTYPE_NONF_IPV6_L2TPV2:
 	case ICE_FLTR_PTYPE_NONF_IPV6_L2TPV2_PPP:
-		ice_pkt_insert_mac_addr(loc, input->ext_data_outer.dst_mac);
-		ice_pkt_insert_mac_addr(loc + ETH_ALEN,
+		ice_pkt_insert_mac_addr(pkt, input->ext_data_outer.dst_mac);
+		ice_pkt_insert_mac_addr(pkt + ETH_ALEN,
 					input->ext_data_outer.src_mac);
 		flags_version = BE16_TO_CPU(input->l2tpv2_data.flags_version);
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-23 17:57:59.812836972 +0100
+++ 0040-net-ice-fix-L2TPv2-outer-MAC-in-training-packet.patch	2026-07-23 17:57:58.648918612 +0100
@@ -1 +1 @@
-From 43739cd2c56a89d24e10fb58c1a403e75cc0d3f1 Mon Sep 17 00:00:00 2001
+From 271b091f4c217513fd45b72f3163603bf9efca6a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 43739cd2c56a89d24e10fb58c1a403e75cc0d3f1 ]
+
@@ -27 +28,0 @@
-Cc: stable at dpdk.org
@@ -36 +37 @@
-index 2c0cb99854..1846fbc515 100644
+index f62313c559..935fd7e395 100644
@@ -50 +51 @@
-@@ -4600,6 +4606,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -4594,6 +4600,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
@@ -59 +60 @@
-@@ -4608,6 +4614,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -4602,6 +4608,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
@@ -68 +69 @@
-@@ -4623,6 +4629,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -4617,6 +4623,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
@@ -77 +78 @@
-@@ -4631,6 +4637,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -4625,6 +4631,6 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,



More information about the stable mailing list