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

datapath,daemon: Enable multi-dev XDP #17655

Merged
merged 3 commits into from Oct 25, 2021
Merged

datapath,daemon: Enable multi-dev XDP #17655

merged 3 commits into from Oct 25, 2021

Conversation

brb
Copy link
Member

@brb brb commented Oct 20, 2021

See commit messages.

The XDP acceleration can be enabled for multiple devices (previously for only one)

@brb brb requested a review from a team October 20, 2021 14:27
@brb brb requested a review from a team as a code owner October 20, 2021 14:27
@maintainer-s-little-helper 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 Oct 20, 2021
@brb brb requested review from joamaki and aditighag October 20, 2021 14:27
@brb brb marked this pull request as draft October 20, 2021 14:27
@brb brb force-pushed the pr/brb/multidev-xdp branch 2 times, most recently from 04f61b9 to 1e274d8 Compare October 22, 2021 14:22
@brb brb changed the title WIP: multi-dev XDP datapath,daemon: Enable multi-dev XDP Oct 22, 2021
@brb brb added 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. labels Oct 22, 2021
@maintainer-s-little-helper 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 Oct 22, 2021
@brb brb requested a review from borkmann October 22, 2021 14:24
@brb
Copy link
Member Author

brb commented Oct 22, 2021

Cilium L4LB XDP CI has passed - https://github.com/cilium/cilium/actions/runs/1372591051. Removing the commit which triggered the run.

@brb brb marked this pull request as ready for review October 22, 2021 14:47
@brb brb requested a review from a team October 22, 2021 14:47
@brb brb requested review from a team as code owners October 22, 2021 14:47
@brb brb requested review from a team, christarazi and ldelossa October 22, 2021 14:47
@brb brb requested a review from qmonnet October 22, 2021 14:47
@brb brb requested review from ldelossa, qmonnet and a team October 25, 2021 19:12
@brb brb force-pushed the pr/brb/multidev-xdp branch 3 times, most recently from 4efe872 to 05cdfcf Compare October 25, 2021 20:34
@brb brb added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 25, 2021
This commit enables XDP (bpf_xdp) on all devices specified by --devices.
Previously, only --direct-routing-device (or --devices if dev count = 1)
could have been used to run bpf_xdp.

To do so, we rely on the bpf_redirect() helper which performance
(>= 5.5 Linux kernel) recently became on par with bpf_redirect_map()
[1]. Therefore, it does not make sense to use the latter.

The side effect of the enablement is that the --prefilter-device no
longer makes sense. This will be addressed in a following commit.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d233886dd904edbf239eeffe435c3308ae97625

Signed-off-by: Martynas Pumputis <m@lambda.lt>
To test that, add another veth pair to the LB node (aka
"kind-control-plane"), and steer the LB request through it (done by
installing ip route: $LB_VIP via $ANOTHER_VETH_PAIR_IP).  After
receiving the request, the LB node will do XDP_REDIRECT to the previous
veth pair (identified by the --direct-routing-device) which is used to
connect with the kind-worker which is running the service backend.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Replace the enablement by the dedicated flag "--enable-xdp-prefilter",
and the mode with the existing "--bpf-lb-acceleration".

Ideally, we should deprecate the filter, but we cannot do it until the
host-fw is supported by the XDP prog.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@borkmann borkmann merged commit da26d0a into master Oct 25, 2021
@borkmann borkmann deleted the pr/brb/multidev-xdp branch October 25, 2021 20:46
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.10.6 Nov 24, 2021
@qmonnet qmonnet mentioned this pull request Nov 30, 2021
5 tasks
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.10 in 1.10.6 Nov 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.10 to Backport done to v1.10 in 1.10.6 Dec 6, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.10 to Backport done to v1.10 in 1.10.6 Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. 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.
Projects
No open projects
1.10.6
Backport done to v1.10
Development

Successfully merging this pull request may close these issues.

None yet

8 participants