> -----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 01/10] net: Document
> skb_metadata_set contract with the drivers
> 
> Prepare to copy XDP metadata into an skb extension chunk. To access
> the metadata contents, we need to know where it is located. Document
> the expectation - skb->data must point right past the metadata when
> skb_metadata_set gets called.
> 
> Signed-off-by: Jakub Sitnicki <[email protected]>
> ---
>  include/linux/skbuff.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index
> 86737076101d..df001283076f 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -4554,6 +4554,13 @@ static inline bool skb_metadata_differs(const
> struct sk_buff *skb_a,
>              true : __skb_metadata_differs(skb_a, skb_b, len_a);  }
> 
> +/**
> + * skb_metadata_set - Record packet metadata length.
> + * @skb: packet carrying the metadata
> + * @meta_len: number of bytes of metadata preceding skb->data
> + *
> + * Must be called when skb->data already points past the metadata
> area.
> + */
>  static inline void skb_metadata_set(struct sk_buff *skb, u8 meta_len)
> {
>       skb_shinfo(skb)->meta_len = meta_len;
> 
> --
> 2.43.0

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to