[PATCH v3] net/ice: fix L2TPv2 outer MAC in training packet

Bruce Richardson bruce.richardson at intel.com
Thu Apr 16 14:10:47 CEST 2026


On Thu, Apr 09, 2026 at 01:14:41PM +0530, Shaiq Wani wrote:
> 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>
> ---
> v3:
> - Fixed checkpatch issue.
> - Moved comment after all declarations.
Acked-by: Bruce Richardson <bruce.richardson at intel.com>

Applied to dpdk-next-net-intel.

Thanks,
/Bruce



More information about the dev mailing list