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
add native tunnel encapsulation support for the XDP Loadbalancer #24422
Merged
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
maintainer-s-little-helper
bot
added
the
dont-merge/needs-release-note-label
The author needs to describe the release impact of these changes.
label
Mar 17, 2023
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
March 20, 2023 07:21
0419dba
to
bf73201
Compare
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
March 20, 2023 12:44
bf73201
to
ded85d8
Compare
/test |
Note that if we want to use the |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
March 20, 2023 22:09
ded85d8
to
7915874
Compare
julianwiedmann
added
the
release-note/minor
This PR changes functionality that users may find relevant to operating Cilium.
label
Mar 20, 2023
maintainer-s-little-helper
bot
removed
the
dont-merge/needs-release-note-label
The author needs to describe the release impact of these changes.
label
Mar 20, 2023
julianwiedmann
added
the
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
label
Mar 20, 2023
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
March 21, 2023 08:36
7915874
to
ca32abc
Compare
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
March 22, 2023 12:37
ca32abc
to
ee7f410
Compare
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
4 times, most recently
from
May 11, 2023 08:58
318eafe
to
6e86902
Compare
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
May 12, 2023 10:45
6e86902
to
3442957
Compare
julianwiedmann
added
kind/feature
This introduces new functionality.
feature/ipv6
Relates to IPv6 protocol support
labels
May 12, 2023
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
2 times, most recently
from
May 12, 2023 14:09
b6e66e6
to
922a055
Compare
/test |
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
May 17, 2023 08:42
922a055
to
4d9d28b
Compare
/test |
When the XDP nodeport code requires tunnel encapsulation, we currently push the packet up to the from-netdev TC program (with XFER_PKT_ENCAP set) and let it handle the tunnel redirect. Replace this with an in-XDP implementation that adds the outer headers for VXLAN or GENEVE. This path now also returns CTX_ACT_REDIRECT, but in contrast to the skb implementation it doesn't set the `ifindex`. We handle this case in the relevant nodeport paths, and fall back to an IPv4 FIB lookup for the outer packet. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Now that we have XDP support for adding tunnel headers, nothing sets XFER_PKT_ENCAP anymore. Remove all the relevant code and parameters. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Configs with DSR-GENEVE will always use a GENEVE tunnel. So make it possible to override the default (VXLAN), and use the correct macro for the complexity tests. This codepath is slightly more complex (it needs to handle GENEVE options), so ensure that we cover it in the tests. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Cover both VXLAN and GENEVE in the XDP compile tests. And add some additional complexity configs for XDP that cover tunnel-routing. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
With the in-XDP encap support, the IPv6 path should now also work. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
With in-XDP encap support, this no longer applies. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
force-pushed
the
1.14-xdp-geneve
branch
from
May 30, 2023 13:11
db08908
to
a34972b
Compare
/ci-e2e |
/test |
rgo3
approved these changes
May 30, 2023
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.
LGTM for loader related changes.
borkmann
approved these changes
May 31, 2023
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
May 31, 2023
This was referenced May 31, 2023
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
Jul 26, 2023
We recently added support for in-XDP tunnel encapsulation with cilium#24422. Thus the performance concerns (packets needing to bounce through TC for encapsulation) no longer apply. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
qmonnet
pushed a commit
that referenced
this pull request
Jul 27, 2023
We recently added support for in-XDP tunnel encapsulation with #24422. Thus the performance concerns (packets needing to bounce through TC for encapsulation) no longer apply. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
sayboras
pushed a commit
to sayboras/cilium
that referenced
this pull request
Jul 31, 2023
[ upstream commit 8a811cb ] We recently added support for in-XDP tunnel encapsulation with cilium#24422. Thus the performance concerns (packets needing to bounce through TC for encapsulation) no longer apply. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Tam Mach <tam.mach@cilium.io>
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
Aug 4, 2023
These were used to transfer encap information from XDP to TC. They are no longer used since cilium#24422 added support for in-XDP tunnel encapsulation. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
added a commit
that referenced
this pull request
Aug 5, 2023
These were used to transfer encap information from XDP to TC. They are no longer used since #24422 added support for in-XDP tunnel encapsulation. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature/ipv6
Relates to IPv6 protocol support
kind/feature
This introduces new functionality.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-blocker/1.14
This issue will prevent the release of the next version of Cilium.
release-note/minor
This PR changes functionality that users may find relevant to operating Cilium.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
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.
#21364 added support for combining XDP with tunnel-routing. This was done through a fallback mechanism, where we would (1) punt packets from XDP up to the
from-netdev
TC program, and (2) redirect them tocilium_vxlan
/cilium_geneve
as usual.Besides the performance implications of the additional hop through the TC path, this also meant that #23890 later couldn't add support for IPv6 traffic with DSR-GENEVE using XDP (as there was no easy way of transporting the IPv6 DSR information from XDP all the way to the TC encap path).
This PR introduces native XDP support for adding VXLAN / GENEVE tunnel headers to a packet, and thus avoids the detour through the TC path.
open aspects
select a proper per-flow OuterSrcPort. It's not a hard blocker to get all the core infrastructure merged, so I plan to tackle this in a follow-on PR.bpf: xdp: use CT tuple hash for tunnel encap's source port #26177thebpf: encap: send TO_OVERLAY trace before adding encapsulation #25828send_trace_notify()
in__encap_with_nodeid()
happens too late for the XDP path - we want it to describe the inner packet, but it already has the tunnel headers. Easy enough to sort out in a follow-on PR.