RE: [PATCH net 2/2] igb: Quiesce the receive path before enabling i210 Rx timestamping

From: Nowlin, Alexander

Date: Wed Sep 30 2026 - 21:45:42 EST


> -----Original Message-----
> From: Pascal Kneuper <PKneuper@xxxxxxxxx>
> Sent: Thursday, September 10, 2026 4:39 AM
> To: Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>; David S . Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>
> Cc: Baldin, Daniel <dbaldin@xxxxxxxxx>; intel-wired-lan@xxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Kneuper, Paskal <pkneuper@xxxxxxxxx>
> Subject: [PATCH net 2/2] igb: Quiesce the receive path before enabling i210 Rx timestamping
>
> Commit e57b8bdb4833 ("igb: Add 1588 support to I210/I211.") enables per-packet Rx timestamping by setting RXPBS.CFG_TS_EN with Rx queues running. On i210/i211, CFG_TS_EN makes the DMA engine prepend a 16-byte timestamp header to every Rx packet buffer and sets RXDADV_STAT_TSIP in the Rx descriptor so igb_clean_rx_irq() strips it.
>
> Setting CFG_TS_EN changes the buffer layout of already-armed descriptors.
> Without a pipeline handshake, descriptor status and packet buffer layout disagree for in-flight packets:
>
> header inserted, no TSIP -> unstripped, frame shifted 16 bytes right
> TSIP set, no header -> 16 bytes stripped, buffer tail appended
>
> In both cases the Ethernet header is corrupted, causing protocol demux to drop the frame silently. Because igb_alloc_mapped_page() allocates pages without __GFP_ZERO, the second case appends uninitialized > memory.
>
> This occurs reliably on i210/i211 under traffic when requesting hardware timestamps at runtime, yielding corrupt frames on off-to-on transitions.
>
> Fix by bracketing the CFG_TS_EN transition with igb_down() and igb_up() when the interface is running, ensuring the bit is only toggled with Rx queues stopped.
>
> Fixes: e57b8bdb4833 ("igb: Add 1588 support to I210/I211.")
> Signed-off-by: Pascal Kneuper <PKneuper@xxxxxxxxx>
> ---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)

Tested-by: Alexander Nowlin <alexander.nowlin@xxxxxxxxx>