-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use bpf programs for l3 devices for IPIP tunnels in kernel 5.14 (rhel 4.18.0-330) and newer #5846
Conversation
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, but I have one question
felix/bpf-gpl/skb.h
Outdated
@@ -68,6 +68,10 @@ static CALI_BPF_INLINE void skb_refresh_start_end(struct cali_tc_ctx *ctx) { | |||
static CALI_BPF_INLINE long skb_iphdr_offset(void) | |||
{ | |||
if (CALI_F_IPIP_ENCAPPED) { | |||
if (GLOBAL_FLAGS & CALI_GLOBALS_IPIP_NO_OUTER_HEADERS) { |
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.
I wonder if instead we would be able to just load the L3 (CALI_F_L3
) programs rather than handling it as a runtime configuration. Then the change could be limited to felix only 🤔
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.
Right. let me check.
Co-authored-by: Tomas Hruby <[email protected]>
Co-authored-by: Tomas Hruby <[email protected]>
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, pls could you squash it no need to have 18 commits for such a change. Thanks!
Description
Unlike other L3 devices, IPIP tunnels used to see ethernet, outer IP header, inner IP header and payload in ingress path. In kernel 5.14 a commit (
7ad136fd288c0 : ipip: allow redirecting ipip and mplsip packets to eth devices
) made IPIP tunnels act like other L3 device, and for that bpf programs attached to IPIP tunnel only see inner IP header and payload.This PR generalises the wirguard programs for all L3 devices including IPIP tunnels with the new behaviour. This PR should also fix this issue: #5449
Related issues/PRs
Todos
Release Note