net: hsr: don't check sequence number if tag removal is offloaded
authorGeorge McCollister <george.mccollister@gmail.com>
Tue, 15 Jun 2021 17:50:37 +0000 (12:50 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2021 19:13:01 +0000 (12:13 -0700)
Don't check the sequence number when deciding when to update time_in in
the node table if tag removal is offloaded since the sequence number is
part of the tag. This fixes a problem where the times in the node table
wouldn't update when 0 appeared to be before or equal to seq_out when
tag removal was offloaded.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/hsr/hsr_framereg.c

index bb1351c38397f10e12f91c1b2cf21cd96d19c9b9..e31949479305e4626c289a16c39bc7c2c450ceed 100644 (file)
@@ -397,7 +397,8 @@ void hsr_register_frame_in(struct hsr_node *node, struct hsr_port *port,
         * ensures entries of restarted nodes gets pruned so that they can
         * re-register and resume communications.
         */
-       if (seq_nr_before(sequence_nr, node->seq_out[port->type]))
+       if (!(port->dev->features & NETIF_F_HW_HSR_TAG_RM) &&
+           seq_nr_before(sequence_nr, node->seq_out[port->type]))
                return;
 
        node->time_in[port->type] = jiffies;