Subject: Re: [PATCH net-next v2 4/9] hsr: Implement more robust duplicate discard for PRP

From: Felix Maurer <[email-masked]>
Date: Tue, 3 Feb 2026 16:11:48 +0100

On Tue, Feb 03, 2026 at 02:49:29PM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-02-03 13:42:48 [+0100], Felix Maurer wrote:
> > Hm, I'm not sure I follow. Do you argue that the code already in the
> > patch is incorrect or that it would be incorrect with Simon's
> > suggestion?
>
> The suggested change should have no impact.
>
> …
>
> > I understood Simon's suggestion this way: in the error path, *also*
> > reset block->time to 0. We'd still return NULL in that case and,
> > crucially, don't advance the next_block. IMHO, that only makes the data
> > more consistent (blocks in the buffer that are not in the xarray always
> > have time=0) and prevents that we try to remove a non-existing entry
> > from the xarray on the next frame when we try again to recycle the
> > current "next" block.
>
> That is correct but should have no visible impact.

Alright, we're on the same track then. I agree that there should not be
any visible impact. But to avoid surprises down the road, I think it's
good to set time=0 for consistency.

Thanks,
   Felix