Subject: Re: [PATCH net-next v5 2/8] hsr: Use skb_clone() while adding the HSR header

From: Willem de Bruijn <[email-masked]>
Date: Fri, 29 May 2026 15:55:45 -0400

Sebastian Andrzej Siewior wrote:
> hsr_create_tagged_frame() creates a new skb where the HSR header can be
> prepended via __pskb_copy(). This does not copy the skb_shared_info part
> of the original skb so any timestamp request is lost.
> 
> An alternative is to use skb_clone() where the skb_shared_info part is
> copied and then skb_cow_head() to make the header part writeable. This

small nit: the shared info is not copied, clones share the same struct.

> avoids touching manually the tx_flags and tskey members.
> Using skb_clone() allows also return early (after the clone) in the
> offloaded case so this can be unified a bit.
> 
> This is a prepartion for PTP handling where timestatmps are requested.
> 
> Signed-off-by: Sebastian Andrzej Siewior <[email-masked]>