net: hsr: Fix PRP duplicate detection
authorJaakko Karrenpalo <jkarrenpalo@gmail.com>
Fri, 7 Mar 2025 16:16:59 +0000 (18:16 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 13 Mar 2025 09:04:22 +0000 (10:04 +0100)
commit05fd00e5e7b1ac60d264f72423fba38cc382b447
treeaca38cf25def31e5160c88bb9b91ab44543325f9
parent676cc91e1f2a3f70f26dffa57b7e54bec9ab9d54
net: hsr: Fix PRP duplicate detection

Add PRP specific function for handling duplicate
packets. This is needed because of potential
L2 802.1p prioritization done by network switches.

The L2 prioritization can re-order the PRP packets
from a node causing the existing implementation to
discard the frame(s) that have been received 'late'
because the sequence number is before the previous
received packet. This can happen if the node is
sending multiple frames back-to-back with different
priority.

Signed-off-by: Jaakko Karrenpalo <jkarrenpalo@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250307161700.1045-1-jkarrenpalo@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/hsr/hsr_device.c
net/hsr/hsr_forward.c
net/hsr/hsr_framereg.c
net/hsr/hsr_framereg.h
net/hsr/hsr_main.h