Re: [PATCH net-next v3 06/14] net: ethernet: oa_tc6: Support for hardware timestamp

From: Andrew Lunn

Date: Fri May 29 2026 - 18:30:59 EST


> +static struct oa_tc6_ts_info_tx *oa_tc6_tsinfo_tx(struct sk_buff *skb)
> +{
> + return (struct oa_tc6_ts_info_tx *)((skb)->cb);

The () around skb should not be needed.

> +static struct oa_tc6_ts_info_rx *oa_tc6_tsinfo_rx(struct sk_buff *skb)
> +{
> + return (struct oa_tc6_ts_info_rx *)((skb)->cb);
> +}

And here.

I've not looked deep into this code yet. What is the lifetime of the
data stored in cb?

> +
> +static void oa_tc6_defer_for_hwtstamp(struct oa_tc6 *tc6,
> + struct sk_buff *skb)
> +{
> + if (!tc6->hw_tstamp_enabled)
> + return;
> + if (!skb || (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) == 0)
> + return;

Can skb be NULL?

Andrew