spec is missing one or more constants #1039
Unanswered
gcptcgnye61
asked this question in
Q&A
Replies: 1 comment
-
Since this is likely down to compiler behaviour (ebpf-go just rewrites the constants it finds, there's not much more it can do), your best bet is to put up a reproducer (a git repo with full code and clear instructions on how to run) and interact on the kernel mailing list(s) to get some eyes on this: https://www.kernel.org/doc/html/latest/bpf/bpf_devel_QA.html#q-reporting-llvm-bpf-issues. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings, I have met a weird problem. When trying to RewriteConstant of the predefined volatile constant IPV6_INNATE_ADDR. Cilium/eBPF reported spec is missing one or more constants: IPV6_INNATE_ADDR. But I have used the constant in the following code:
If I uncomment the bpf_printk portion of the code, the warning goes away. Is this because I casted IPV6_INNATE_ADDR? I am not sure if this is a optimization problem or ebpf-go problem.
@lmb think this is a problem with how clang deals with array accesses through a volatile pointer, and suggested that I could try to make
struct in6_addr *prefix
volatile as well. So I made the following changes:Unfortunatly this did not make the error go away. But by using struct instead of array when defining the constant, I avoided this problem:
Does anyone have idea why a volatile array have such problem? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions