-
Notifications
You must be signed in to change notification settings - Fork 163
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
Set BPF Skeleton name to base name of ebpf file #436
Conversation
Erm, what bug are you fixing here? We don't actually pass any names with a directory prefix as skeleton names AFAIK? |
Not a bug but more of a feature. I use the xdp-tools build system as a scaffold for my libxdp-based programs. If I or someone else wants to have the eBPF programs in a special directory then he needs this. |
Hmm, okay, well I guess this doesn't hurt to include. Do note that using the repository like this is not something that's explicitly supported, so I won't promise not to make changes that you'll have to adapt to :) |
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.
Could you please update the commit message to include the rationale (including the fact that this does not affect anything currently in the repo)?
52c1c42
to
311f214
Compare
I just fixed the commit message. I added removing *.ll files in nested directories in the |
e0f44b0
to
cf5ceb1
Compare
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.
The DCO bot is complaining that the commit author and S-o-b tag; please fix that (you can reset the author with git commit --amend --author=
, or just change the S-o-b tag.
b39c004
to
6471272
Compare
Better, but now the commit message disappeared again :( |
The current build system sets the name of the generated skeleton directly to the file's name minus the .skel.h suffix. In case the eBPF program was in a nested directory, this leads to syntax errors in the skeleton file. This commit support ebpf programs in nested directory by poping out the directory part in the eBPF program name without breaking the build of currently available eBPF program. Signed-off-by: Jalal Mostafa <[email protected]>
6471272
to
09d50a9
Compare
Oops. Sorry. |
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.
Alright, that's better, thanks! :)
The current build system sets the name of the generated skeleton directly to the file's name minus the
.skel.h
suffix.Passing names of eBPF targets that contain a directory will result in wrong names e.g.
bpf/xdp_program.bpf.o
will have a skeleton file of the namebpf/xdp_program.skel.h
and consequently the program name will bebpf/xdp_program
instead ofxdp_program
. The commit pops out the directory part from the name.