Re: [PATCH net] igc: track rx frame boundaries independent of skbs

From: Paul Moses

Date: Tue Oct 27 2026 - 12:36:19 EST






On Tuesday, October 27th, 2026 at 3:24 AM, Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx> wrote:

> On Mon, Oct 26, 2026 at 10:12:51PM +0000, Paul Moses wrote:
> >
> >
> >
> >
> > On Monday, October 26th, 2026 at 2:46 PM, Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx> wrote:
> >
> > > On Sun, Oct 25, 2026 at 06:52:06AM +0000, Paul Moses wrote:
> > > > TSIP remains set on continuation descriptors, but the inline timestamp
> > > > header exists only in the first buffer. Stripping it from every
> > > > descriptor truncates split frames and can underflow short buffers.
> > > >
> > > > skb ownership cannot identify frame boundaries when XDP consumes the
> > > > first buffer or AF_XDP uses zero-copy.
> > > >
> > > > Track rx_in_frame per ring and update it as descriptors are consumed.
> > > > Strip timestamps only from first buffers, reject unsupported split
> > > > frames before XDP and drain continuations. Account discarded
> > > > descriptors against NAPI work without counting successful RX.
> > > >
> > > > Fixes: e1ed4f92a625 ("igc: Refactor Rx timestamp handling")
> > > > Fixes: 26575105d6ed ("igc: Add initial XDP support")
> > > > Fixes: fc9df2a0b520 ("igc: Enable RX via AF_XDP zero-copy")
> > > > Cc: stable@xxxxxxxxxxxxxxx
> > > > Signed-off-by: Paul Moses <p@xxxxxxx>
> > > > ---
> > > > - This supersedes "igc: only strip RX timestamp header from first buffer"
> > > > following feedback from Simon Horman, Maciej Fijalkowski and Sashiko.
> > > >
> > > > Changes:
> > > > - track frame boundaries independently of skb ownership
> > > > - guard timestamp stripping and drain unsupported split frames
> > > > - cover the AF_XDP zero-copy RX path
> > > > ---
> > > > drivers/net/ethernet/intel/igc/igc.h | 1 +
> > > > drivers/net/ethernet/intel/igc/igc_main.c | 87 ++++++++++++++++-------
> > > > 2 files changed, 64 insertions(+), 24 deletions(-)
> > >
> > > Hi Paul,
> > >
> > > I think this implementation went off track. We should make sure we *never*
> > > enter data path for XDP/AF_XDP multi-buffer scenario until we add real
> > > support to it within this driver. Now you sorta handle fragmented packets
> > > in data path.
> > >
> > > I tried to argue with bot reports that it hallucinated for
> > > igc_clean_rx_irq() content (which was concise and to the point) and agreed
> > > the AF_XDP should *not* be exposed to any fragmented traffic, which should
> > > be addressed on HW RX ring configuration side, not within data path.
> > >
> > > Also this should have been a v3 with a link to previous revisions so we
> > > could keep track what has been changing between versions.
> > >
> > > Here's something that would address ZC fragmentation issue. Could you give
> > > it a spin on your side as I don't currently have igc in my setup handy.
>
> [...]
>
> >
> > Looks good to me, passes basic testing, and I would rather you/intel do this patch
> >
> > For posterity, I did email Tony with handoff notes stating I'd rather not do the
> > xdp/xsk/af_xdp/fpe side of things, but hadn't heard back so I kept going.
>
> I think this was within the thread where AI hallucinated and I stepped in.

No worries, it turned out more interesting than expected.

> If you are not fed up yet you can take your v2 and the patch I added here
> and send this as a change set. From my POV it would be better as you have
> the HW to test this against and ironically my igc card went into
> /dev/null's lab.
>
> >
>
Not fed up but sleep deprived, yes, I'll do that.