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

From: Felix Maurer <[email-masked]>
Date: Thu, 5 Feb 2026 15:02:03 +0100

On Thu, Feb 05, 2026 at 01:25:01PM +0100, Paolo Abeni wrote:
> On 2/2/26 3:19 PM, Felix Maurer wrote:
[...]
> > Reported-by: Steffen Lindner <[email-masked]>
> > Fixes: 05fd00e5e7b1 ("net: hsr: Fix PRP duplicate detection")
>
> I'm sorry for nit picking, but it looks like the current quidance is to
> avoid fixes tag for this kind of resiliece improving refactors:
>
> https://lore.kernel.org/netdev/[email-masked]/
>
> > @@ -526,18 +613,21 @@ int hsr_register_frame_out(struct hsr_port *port, struct hsr_frame_info *frame)
> >   */
> >  int prp_register_frame_out(struct hsr_port *port, struct hsr_frame_info *frame)
> >  {
> > -	enum hsr_port_type other_port;
> > -	enum hsr_port_type rcv_port;
> > +	u16 sequence_nr, seq_bit, block_idx;
> > +	struct hsr_seq_block *block;
> >  	struct hsr_node *node;
> > -	u16 sequence_diff;
> > -	u16 sequence_exp;
> > -	u16 sequence_nr;
> >
> > -	/* out-going frames are always in order
> > -	 * and can be checked the same way as for HSR
> > -	 */
> > -	if (frame->port_rcv->type == HSR_PT_MASTER)
> > -		return hsr_register_frame_out(port, frame);
> > +	node = frame->node_src;
> > +	sequence_nr = frame->sequence_nr;
> > +
> > +	// out-going frames are always in order
>
> Please use /* */ for comments.

Both done in v4 [1], plus one more instance of a // comment.

Thanks,
   Felix

[1]: https://lore.kernel.org/netdev/[email-masked]/