-
Notifications
You must be signed in to change notification settings - Fork 120
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
map 'polx_map' has to have BTF in order to use bpf_spin_lock #953
Comments
Here is the BTF LOAD LOG output and PROG LOAD LOG output and relevant code https://github.com/loxilb-io/loxilb-ebpf/blob/main/kernel/llb_kern_policer.c#L13-L41
|
By default, all maps have btf enabled in loxilb. The following is in Ubuntu -
Can you please double check which clang version is in use ? |
I guess it could be combination of kernel + tool chain (clang) + bpf_spin_lock in map triggering a bug. I tried on Ubuntu 22.04 with kernel 6.8, no problem. |
tried both clang 18.1.0 and clang 19.1.7, still same issue |
@TrekkieCoder maybe the libbpf BTF loading error explains the no polx_map no BTF problem?
|
I copy and pasted the whole BTF LOG to deepseek AI and it says
but bpftool btf dump on the llb_ebpf_main.o on ubuntu shows same by the way the
|
I downgraded BPFire kernel from 6.12.5 to 6.6.15, it works, appears kernel version affect this issue |
according to AI, the suggestion is lower kernel version like 6.6.15 might not strictly enforce checking type_id=0, newer kernel version 6.12.5 could strictly enforced invalidating type_id=0. I looked at kernel source |
Thanks @vincentmli for all the info. Will double check with kernel >= 6.12 and update. |
after upgrading loxilb to 0.9.8 on BPFire, when start loxilb, the bpf verifier had error like below:
loxilb 0.9.6 runs fine on BPFire, and BPFire has kernel BTF enabled and kernel is 6.12.5.
here is the kernel 6.12.5 verifier code that emit the error
here is the BTF LOG output while loading
the polx_map
I asked deepseek AI :). the AI says map value
__type(value, struct dp_pol_tact);
definition in BTF LOAD LOG output should point toSTRUCT dp_pol_tact
, notPTR (anon)
and says it could be potential tool chain bug like compilerThe text was updated successfully, but these errors were encountered: