[multicast] add UDP multicast send/recv#13
Open
zeeshanlakhani wants to merge 3 commits into
Open
Conversation
This adds multicast send/recv to the UDP probe so omicron's a4x2 multicast
end-to-end test(s) (using thundermuffin as the send/recv probe) can validate
forwarding through real OPTE + softnpu. Multicast is detected at runtime via
`IpAddr::is_multicast()`.
The sender configures TTL/hops, loop, and the outgoing interface, while the
receiver binds wildcard with `SO_REUSEADDR` and joins via `join_multicast_v{4,6}`.
The receiver tracks `rx_count` and `loss_count` via an 8-byte big-endian
sequence prefix and emits a JSON summary on exit, where exit is non-zero if
`rx_count == 0`.
`Server::duration` was also added as a wallclock cutoff. TCP + multicast bails
out at parse (multicast is a UDP-only concept at the IP layer).
Note that workspace edition bumped 2021 to 2024.
8eda46e to
82b1da2
Compare
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
taspelund
reviewed
May 7, 2026
|
Looks pretty solid to me overall. Just a couple nits and questions |
Includes: - renames and generalizes `--ttl` for mcast and unicast needs - receivers now bind directly to the group addr with SO_REUSEADDR - the 8-byte BE seq prefix is now written/parsed on every UDP packet so loss/rx counts work for unicast too - recv-loop duration check uses start.elapsed() instead of a precomputed deadline - a bigger change: adding SSM (RFC 4607) for v4 + v6 via a repeatable `--multicast-source` on Server. v4 calls socket2's join_ssm_v4 once per source; however, for v6 we have to use a POSIX setsourcefilter (socket2 0.6.3 still has no v6 SSM API). Sources must parse as unicast at clap time, etc. - [deps] This bumps socket2 to 0.6.3 (set_nodelay -> set_tcp_nodelay, set_ttl -> set_ttl_v4) and adds libc dep for the setsourcefilter wrapper
2c3c461 to
e7ce597
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds multicast send/recv to the UDP probe so omicron's a4x2 multicast end-to-end test(s) (using thundermuffin as the send/recv probe) can validate forwarding through real OPTE + softnpu. Multicast is detected at runtime via
IpAddr::is_multicast().The sender configures TTL/hops, loop, and the outgoing interface, while the receiver binds wildcard with
SO_REUSEADDRand joins viajoin_multicast_v{4,6}. The receiver tracksrx_countandloss_countvia an 8-byte big-endian sequence prefix and emits a JSON summary on exit, where exit is non-zero ifrx_count == 0.Server::durationwas also added as a wallclock cutoff. TCP + multicast bails out at parse (multicast is a UDP-only concept at the IP layer).Note that workspace edition bumped 2021 to 2024.