-
Notifications
You must be signed in to change notification settings - Fork 111
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
bpf_loop
Dependency Causes Errors in Kernel Versions < 5.17 When Extending TCP Payload with extend_skb Hook
#1439
Comments
Hi @tomatopunk, thanks for bringing this up. Yeah, unfortunately the dependency on If you look here, you will see that we do print out an error, but we are missing a I also wanted to note that Another thing I'd like to point out in case it helps, is that RedHat based kernels tend to have all of these functionalities (such as bpf_loop and other eBPF related patches) backported. |
Hello team, I completely agree with your point: bpf_loop and other patches should be ported. However, this function is a 2017 patch with no clear plan for porting. Therefore, I think that if we decide to use bpf_loop, we should highlight this issue more prominently, such as including the minimum kernel version in the documentation. Furthermore, the dependency on bpf_loop isn't just here. For example, in #1413, unfortunately, there's also an edge-back issue when searching for the traceparent header, which might require using bpf_loop. Internally, what is our view on such issues? Should we strive for compatibility or abandon it, setting 5.17 as the minimum kernel version? |
Hi @tomatopunk , I agree with you - I've added improving documentation to my TODO list. With regards to searching the traceparent header, it's one of those cases in which we depend on bpf_loop. There may be another way of accomplishing that, but for the moment, the current implementation is constrained to kernels >= 5.17 - this has always been the case for detecting the trace parent and I don't think we ever supported this functionality on older kernels.
We have plans to continue supporting kernels older than 5.17. As you said yourself, a lot of people are using older kernels (including some of our customers), therefore making establishing 5.17 as a minimum kernel version not feasible. Obviously those people don't have access to trace context propagation. To sum up, there are two action items here:
|
extend_skb hook extends the TCP payload. When writing new additional data to the payload, the bpf_loop function is used, but this function only exists in kernel versions greater than 5.17.
beyla/bpf/tc_http_tp.c
Lines 402 to 407 in d2a8a83
If we enable BEYLA_BPF_TC_L7_CP:true and use a kernel version lower than 5.17, an error occurs.
Considering that the current long-term versions include 5.15, 5.10, 5.4, and 4.19, this issue should be considered a bug and needs to be addressed.
The text was updated successfully, but these errors were encountered: