patch 'net/ice: fix L2TPv2 outer MAC in training packet' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:19:49 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cee3507bc677cfded4fcc1579f318281050c9d21
Thanks.
Luca Boccassi
---
>From cee3507bc677cfded4fcc1579f318281050c9d21 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/ice/base/ice_fdir.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index f62313c559..935fd7e395 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -3835,6 +3835,12 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
u16 pos;
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) {
case ICE_IP_PROTO_TCP:
@@ -4593,16 +4599,16 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
input->ip.v6.tc);
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,
input->l2tpv2_data.session_id);
break;
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);
if (flags_version & ICE_L2TPV2_FLAGS_LEN) {
@@ -4616,16 +4622,16 @@ 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,
input->l2tpv2_data.session_id);
break;
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);
if (flags_version & ICE_L2TPV2_FLAGS_LEN) {
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:02.907067663 +0100
+++ 0040-net-ice-fix-L2TPv2-outer-MAC-in-training-packet.patch 2026-06-11 14:20:01.214745982 +0100
@@ -1 +1 @@
-From 43739cd2c56a89d24e10fb58c1a403e75cc0d3f1 Mon Sep 17 00:00:00 2001
+From cee3507bc677cfded4fcc1579f318281050c9d21 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 43739cd2c56a89d24e10fb58c1a403e75cc0d3f1 ]
+
@@ -27 +28,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
- drivers/net/intel/ice/base/ice_fdir.c | 22 ++++++++++++++--------
+ drivers/net/ice/base/ice_fdir.c | 22 ++++++++++++++--------
@@ -35,4 +36,4 @@
-diff --git a/drivers/net/intel/ice/base/ice_fdir.c b/drivers/net/intel/ice/base/ice_fdir.c
-index 2c0cb99854..1846fbc515 100644
---- a/drivers/net/intel/ice/base/ice_fdir.c
-+++ b/drivers/net/intel/ice/base/ice_fdir.c
+diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
+index f62313c559..935fd7e395 100644
+--- a/drivers/net/ice/base/ice_fdir.c
++++ b/drivers/net/ice/base/ice_fdir.c
@@ -52 +53 @@
-@@ -4599,16 +4605,16 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -4593,16 +4599,16 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
@@ -73 +74 @@
-@@ -4622,16 +4628,16 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -4616,16 +4622,16 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
More information about the stable
mailing list