RE: [PATCH net 2/2] igb: Quiesce the receive path before enabling i210 Rx timestamping
flat view
From: Nowlin, Alexander <hidden>
Date: 2026-10-01 01:45:37
Also in:
intel-wired-lan, lkml
-----Original Message-----
From: Pascal Kneuper <redacted>
Sent: Thursday, September 10, 2026 4:39 AM
To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>; David S . Miller <davem@davemloft.net>; Eric Dumazet <redacted>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>
Cc: Baldin, Daniel <redacted>; intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Kneuper, Paskal <redacted>
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 <redacted>
---
drivers/net/ethernet/intel/igb/igb_ptp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)Tested-by: Alexander Nowlin <redacted>