> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Jakub Sitnicki via Intel-wired-lan
> Sent: Saturday, January 10, 2026 10:05 PM
> To: [email protected]
> Cc: David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; Simon Horman <[email protected]>; Michael Chan
> <[email protected]>; Pavan Chebbi <[email protected]>;
> Andrew Lunn <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Saeed Mahameed <[email protected]>;
> Leon Romanovsky <[email protected]>; Tariq Toukan <[email protected]>;
> Mark Bloch <[email protected]>; Alexei Starovoitov <[email protected]>;
> Daniel Borkmann <[email protected]>; Jesper Dangaard Brouer
> <[email protected]>; John Fastabend <[email protected]>;
> Stanislav Fomichev <[email protected]>; intel-wired-
> [email protected]; [email protected]; [email protected]
> Subject: [Intel-wired-lan] [PATCH net-next 10/10] xdp: Call
> skb_metadata_set when skb->data points past metadata
>
> Prepare to copy the XDP metadata into an skb extension in
> skb_metadata_set.
>
> XDP generic mode runs after MAC header has been already pulled. Adjust
> skb->data before calling skb_metadata_set to adhere to new contract.
>
> Signed-off-by: Jakub Sitnicki <[email protected]>
> ---
> net/core/dev.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c index
> c711da335510..f8e5672e835f 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5468,8 +5468,11 @@ u32 bpf_prog_run_generic_xdp(struct sk_buff
> *skb, struct xdp_buff *xdp,
> break;
> case XDP_PASS:
> metalen = xdp->data - xdp->data_meta;
> - if (metalen)
> + if (metalen) {
> + __skb_push(skb, mac_len);
> skb_metadata_set(skb, metalen);
> + __skb_pull(skb, mac_len);
> + }
> break;
> }
>
>
> --
> 2.43.0
Reviewed-by: Aleksandr Loktionov <[email protected]>