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
[v1.15] Multicast Datapath Backport #31668
Merged
michi-covalent
merged 5 commits into
cilium:v1.15
from
ldelossa:ldelossa/multicast-datapath-v1.15
Mar 29, 2024
Merged
[v1.15] Multicast Datapath Backport #31668
michi-covalent
merged 5 commits into
cilium:v1.15
from
ldelossa:ldelossa/multicast-datapath-v1.15
Mar 29, 2024
Conversation
This file contains 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
Contributor
ldelossa
commented
Mar 28, 2024
- bpf: initial multicast support #29469 (@ldelossa )
maintainer-s-little-helper
bot
added
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
labels
Mar 28, 2024
michi-covalent
approved these changes
Mar 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in api/v1
lgtm
[ upstream commit b7822a3 ] This commit adds the eBPF map used to implement the synthetic multicast feature. A `BPF_MAP_TYPE_HASH_OF_MAPS`, which employees a `BPF_MAP_TYPE_HASH` inner map, is added to the datapath. The outer eBPF map is keyed by IPv4 multicast group addresses in big endian format and the values are `BPF_MAP_TYPE_HASH` maps. The inner hash map associates IPv4 source addresses with their subscriber multicast metadata. Each key/value in the inner hash map is a subscriber of the owning multicast group. Signed-off-by: Louis DeLosSantos <louis.delos@isovalent.com>
[ upstream commit d7e580f ] This commit introduces IGMPv3 detection and parsing. When bpf_lxc recognizes IGMP messages egressing the Pod we attempt to parse them. The parsing logic is as follows: 1. Determine if traffic is IGMP 2. Determine the IGMP message type 3. If the type is not a membership report simply drop it (for now) 4. Parse each group record in the membership report 5. For any group records which indicate a join add a subscriber to the multicast subscriber map, if it exists. Signed-off-by: Louis DeLosSantos <louis.delos@isovalent.com>
[ upstream commit 8c488dd ] This commit adds parsing of IGMPv2 messages in a similar fashion as IGMPv3 messages. Signed-off-by: Louis DeLosSantos <louis.delos@isovalent.com>
[ upstream commit 2afcb61 ] This commit implements replication and delivery of multicast packets. This commit also enables the Cilium datapath to access both `bpf_clone_redirect` and `bpf_map_for_each_elem` helpers. The datapath flow is illustrated below: ┌──────────────────────────────────────────┐ │ │ │ Sender │ │ ┌──────┐ ┌─────────┐ │ │ │ pod ├─────► bpf_lxc │ │ │ └──────┘ └────┬────┘ │ │ Local Receivers │ eBPF Replication │ │ ┌──────┐ ┌──────┐ │ and Redirection │ │ │ pod ◄─┤ veth ◄─┤(cil_from_container) │ │ └──────┘ └──────┘ │ ┌───────┐ │ │ ├─► vxlan │ │ │ ┌──────┐ ┌──────┐ │ └───┬───┘ │ │ │ pod ◄─┤ veth ◄─┘ │ │ │ └──────┘ └──────┘ ┌────┘ │ │ │ │ └─────────────────────┼────────────────────┘ │ ┌─────────────────────┼────────────────────┐ │ │ │ │ ┌───▼───┐ │ │ │ vxlan │ │ │ └───┬───┘ │ │ Remote Receivers │ eBPF Replication │ │ ┌──────┐ ┌──────┐ │ and Redirection │ │ │ pod ◄─┤ veth ◄─┤ (from_overlay) │ │ └──────┘ └──────┘ │ │ │ │ │ │ ┌──────┐ ┌──────┐ │ │ │ │ pod ◄─┤ veth ◄─┘ │ │ └──────┘ └──────┘ │ │ │ └──────────────────────────────────────────┘ A multicast sender sends a multicast packet. The sender's bpf_lxc program does a lookup in the multicast group map to discover who has subscribed to the group. The program then clones and redirects the packets to the subscriber's ingress device on the host namespace. If the subscriber is remote the packet is cloned and redirected to a vxlan device for encapsulation. Once the host stack forwards the vxlan encap'd packet to the receiving vxlan device on the remote host a similar "clone and redirect" process is performed once the vxlan driver decaps the packet. Signed-off-by: Louis DeLosSantos <louis.delos@isovalent.com>
ldelossa
force-pushed
the
ldelossa/multicast-datapath-v1.15
branch
from
March 29, 2024 00:15
3b7de5a
to
7255b3b
Compare
Signed-off-by: Louis DeLosSantos <louis.delos@isovalent.com>
/test-backport-1.15 |
harsimran-pabla
approved these changes
Mar 29, 2024
glibsm
approved these changes
Mar 29, 2024
michi-covalent
approved these changes
Mar 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubber stamping from tophat
maintainer-s-little-helper
bot
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
Mar 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
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.