libbpf-rs: Few changes to recent patches#336
libbpf-rs: Few changes to recent patches#336danielocfb merged 2 commits intolibbpf:masterfrom danielocfb:topic/fixes
Conversation
anakryiko
left a comment
There was a problem hiding this comment.
so this concern about failed linking step and maybe (in the future) still needing linker instance makes sense. Let's not make .link() take self and keep it as is. On libbpf side, calling bpf_linker__add_file after bpf_linker__finalize will keep returning -EINVAL, so no corruption or anything like that will happen.
Other than that, LGTM.
Sounds good. I reverted that part of the change. An alternative would be to include |
With Rust 1.67 clippy warns about us not inlining some variables in format strings in some locations. Follow the suggestions mostly, except where we are dealing with large code blocks that already contain curly braces. Signed-off-by: Daniel Müller <deso@posteo.net>
This patch changes a few nuisances from recent pull requests: - Rename `Linker::add()` to `add_file` to follow libbpf naming more closely (I still kept `Linker::link()` (as opposed to finalize)) as it seems apt. - Fix `SEC` used in `test_skeleton_builder_deterministic`. The program would no longer load with libbpf 1.0. - Use `vmlinux.h` instead of `<linux/bpf.h>` for consistency with other skeletons. Signed-off-by: Daniel Müller <deso@posteo.net>
|
Rebased against #334. Will merge once everything is green. |
This patch changes a few nuisances from recent pull requests:
Linker::add()toadd_fileto follow libbpf naming moreclosely (I still kept
Linker::link()(as opposed to finalize)) as itseems apt.
SECused intest_skeleton_builder_deterministic. The programwould no longer load with libbpf 1.0.
vmlinux.hinstead of<linux/bpf.h>for consistency with otherskeletons.
Signed-off-by: Daniel Müller deso@posteo.net