Re: [PATCH net 3/3] igb: prepare TSO and checksum offloads before TX timestamps
From: Eric Dumazet
Date: Tue Oct 27 2026 - 02:43:41 EST
Le lun. 26 oct. 2026 à 10:16, Paul Moses <p@xxxxxxx> a écrit :
>
> igb_xmit_frame_ring() takes an extra skb reference for TX timestamping
> before transmit preparation. For GSO packets, igb_tso() calls
> skb_cow_head(), which can reach pskb_expand_head() with a shared skb
> when the header is cloned. Commit c7d8bc3dd511 ("net: skbuff: don't BUG()
> on bad arguments to pskb_expand_head()") replaced the BUG_ON() with
> -EINVAL, causing TSO preparation to fail and the packet to be dropped.
>
> For non-GSO packets with CHECKSUM_PARTIAL, igb_tx_csum() falls back to
> skb_checksum_help() for unsupported checksum offsets. This can also
> reach pskb_expand_head() through skb_ensure_writable(). igb_tx_csum()
> ignores the error, allowing transmission to continue without completing
> the checksum.
>
> Move TSO and checksum preparation before taking the timestamp reference.
> Add the timestamp bit to first->tx_flags without overwriting the offload
> flags.
>
> Fixes: 1f6e8178d685 ("igb: Prevent dropped Tx timestamps via work items and interrupts.")
> Fixes: 6e033700887b ("igb: Add support for generic Tx checksums")
> Signed-off-by: Paul Moses <p@xxxxxxx>
Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>