-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Support NodePort BPF on L2-less devices #14858
Conversation
c3d8dc4
to
32c5872
Compare
test-net-next |
2d803c0
to
250a8d7
Compare
250a8d7
to
3699607
Compare
test-net-next |
2 similar comments
test-net-next |
test-net-next |
23b7b27
to
fc8fc37
Compare
da2fe92
to
da75418
Compare
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.
modulo the minor bits, lgtm!
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.
🎉 Awesome! Just a few comments below
This commit extends NodePort BPF by making it possible to run it on L3 network devices (without L2 addr). One prominent case is the Wireguard tunnel device (wg0). The main idea of the change is to make ETH_HLEN configurable via ELF templating (on L2-less devices we set it to 0 during the load time), and to craft an L2 hdr when forwarding from L2-less to L2 device. Signed-off-by: Martynas Pumputis <[email protected]>
The previous commit added a support for L2-less devices. Signed-off-by: Martynas Pumputis <[email protected]>
Fix a bug when NodePort BPF is disabled after the device detection, and BPF host routing is kept enabled. Fixes: 7e0cb33 ("bpf: do not enable host routing when kpr is disabled") Signed-off-by: Martynas Pumputis <[email protected]>
This should eliminate a datapath perf penalty introduced by the L2-less changes when running on systems which all involved devices have L2 addrs. Signed-off-by: Martynas Pumputis <[email protected]>
Until #15075 has been resolved. Signed-off-by: Martynas Pumputis <[email protected]>
test-me-please |
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.
Couple comments which we'll require follow ups if I didn't miss something.
The PR "datapath: Support NodePort BPF on L2-less devices" [1] has increased the complexity of bpf_host and bpf_lxc by introducing a support for ETH_HLEN=0. Extend the base options by adding ETH_HLEN=0 to stress test the verifier complexity. [1]: #14858 Suggested-by: Paul Chaignon <[email protected]> Signed-off-by: Martynas Pumputis <[email protected]>
The PR "datapath: Support NodePort BPF on L2-less devices" [1] has increased the complexity of bpf_host and bpf_lxc by introducing a support for ETH_HLEN=0. Extend the base options by adding ETH_HLEN=0 to stress test the verifier complexity when running on net-next (ETH_HLEN=0 depends on the skb_change_head helper which was introduced in 5.8). [1]: #14858 Suggested-by: Paul Chaignon <[email protected]> Signed-off-by: Martynas Pumputis <[email protected]>
The PR "datapath: Support NodePort BPF on L2-less devices" [1] has increased the complexity of bpf_host and bpf_lxc by introducing a support for ETH_HLEN=0. Extend the base options by adding ETH_HLEN=0 to stress test the verifier complexity when running on net-next (ETH_HLEN=0 depends on the skb_change_head helper which was introduced in 5.8). [1]: #14858 Suggested-by: Paul Chaignon <[email protected]> Signed-off-by: Martynas Pumputis <[email protected]>
The PR "datapath: Support NodePort BPF on L2-less devices" [1] has increased the complexity of bpf_host and bpf_lxc by introducing a support for ETH_HLEN=0. Extend the base options by adding ETH_HLEN=0 to stress test the verifier complexity when running on net-next (ETH_HLEN=0 depends on the skb_change_head helper which was introduced in 5.8). [1]: #14858 Suggested-by: Paul Chaignon <[email protected]> Signed-off-by: Martynas Pumputis <[email protected]>
The PR "datapath: Support NodePort BPF on L2-less devices" [1] has increased the complexity of bpf_host and bpf_lxc by introducing a support for ETH_HLEN=0. Extend the base options by adding ETH_HLEN=0 to stress test the verifier complexity when running on net-next (ETH_HLEN=0 depends on the skb_change_head helper which was introduced in 5.8). [1]: #14858 Suggested-by: Paul Chaignon <[email protected]> Signed-off-by: Martynas Pumputis <[email protected]>
The PR "datapath: Support NodePort BPF on L2-less devices" [1] has increased the complexity of bpf_host and bpf_lxc by introducing a support for ETH_HLEN=0. Extend the base options by adding ETH_HLEN=0 to stress test the verifier complexity when running on net-next (ETH_HLEN=0 depends on the skb_change_head helper which was introduced in 5.8). [1]: #14858 Suggested-by: Paul Chaignon <[email protected]> Signed-off-by: Martynas Pumputis <[email protected]>
See commit msgs.
I haven't added IPv6 tests, as I'd need to extend https://github.com/cilium/kube-wireguarder to support it. At this point, it would be a waste of time, as we are planning to add the native Wireguard support in this release cycle. So we can add the tests once #15075 has been resolved.
To fix L2-less with the fast redirect I've opened #15075.
Fix #12317