challenges with DEBUG_INFO_BTF

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2023-10-19 19:32:15
Also in: bpf

Since patchworks does make allmodconfig it caught a small challenge
with our setup.
The makefile looks as follows:

 obj-y := p4tc_types.o p4tc_tmpl_api.o p4tc_pipeline.o \
        p4tc_action.o p4tc_table.o p4tc_tbl_entry.o \
        p4tc_runtime_api.o
obj-$(CONFIG_DEBUG_INFO_BTF) += p4tc_bpf.o

This compiles fine with the exception the bpf program that references
the kfuncs will fail to load. Bad for usability of course.

make allmodconfig does not enable CONFIG_DEBUG_INFO_BTF which means
CONFIG_DEBUG_INFO_BTF_MODULES is not turned on given dependency;
This leaves us with two options:

1) Issue a warning, as such

+ifndef CONFIG_DEBUG_INFO_BTF
+$(warning WARNING: DEBUG_INFO_BTF is off. No P4TC kfuncs will be compiled.)
+endif
At least the user will get a compile warning..

2) so another approach is we can force enable CONFIG_DEBUG_INFO_BTF.
Sadly this would require many other options in addition be to force
enabled such as CONFIG_DEBUG_INFO, etc (which is complex).

My current thinking is to leave it as #1 or the variant we have right
now (without the warning).
Thoughts?
+cc Florian (since netfilter may have had similar challenges)

cheers,
jamal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help