Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HSR/PRP printing #1

Merged
merged 5 commits into from
Feb 20, 2024
Merged

HSR/PRP printing #1

merged 5 commits into from
Feb 20, 2024

Conversation

cappe987
Copy link

@cappe987 cappe987 commented Feb 9, 2024

See upstreaming discussion here the-tcpdump-group#1126

Note that PRP could potentially match on non-PRP packets with a payload that just happens to look like a PRP trailer.

Should we remove the tests for internal patches? And maybe squash the rest together?

HSR is a redundancy protocol that duplicates traffic and sends it two
ways in a ring with an HSR header that includes a sequence number. Other
devices in the ring will forward the first occurrence of a packet, and
discard the duplicate (based on SMAC + sequence number). This enables
zero packet loss when a link goes down.

Signed-off-by: Casper Andersson <[email protected]>
Supervision frames are sent out by the nodes to notify about their
existence, and in the case of a RedBox it will notify about the
upstream devices.

Signed-off-by: Casper Andersson <[email protected]>
PRP is a redundancy protocol, like HSR, that duplicates packets and
includes a sequence number. However, PRP uses a trailer on the packet,
making the parsing a bit tricky. The trailer includes the packet size
that can be used to help ascertain it is a valid PRP trailer, however it
is still possible that this can appear naturally in a packet somewhere
in a network that doesn't use PRP.

Signed-off-by: Casper Andersson <[email protected]>
@cappe987 cappe987 requested review from voldymyr and FredSkar February 9, 2024 08:53
@cappe987 cappe987 self-assigned this Feb 9, 2024
Test setup used:
ip link add veth1 type veth peer name veth2
ip link set dev veth1 up
ip link set dev veth2 up
ip link add name hsr0 type hsr slave1 veth1 slave2 veth2 version 1 proto 0
ip link set dev hsr0 up

And same but with PRP:
ip link add name prp0 type hsr slave1 veth1 slave2 veth2 proto 1

Supervision frames are automatically sent out by the kernel on HSR/PRP
interfaces.

Signed-off-by: Casper Andersson <[email protected]>
To avoid dissecting PRP trailer when we aren't using PRP.
@cappe987 cappe987 force-pushed the hsr-prp-print-internal branch from 59ac1fd to a56ce98 Compare February 14, 2024 14:21
@voldymyr
Copy link

Good work Casper! Regarding squashing, for me personally, it is easier to get understanding of what's what, when unsquashed. It is probably a matter of likes/dislikes. Also, do you suggest to remove the tests?

@cappe987
Copy link
Author

Good work Casper! Regarding squashing, for me personally, it is easier to get understanding of what's what, when unsquashed. It is probably a matter of likes/dislikes. Also, do you suggest to remove the tests?

We can keep it as it is, tests included.

@cappe987 cappe987 merged commit b14edd7 into wmo/tcpdump-4.99.1 Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants