forked from microsoft/ebpf-for-windows
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf(): improve map and program compatibility (microsoft#3980)
* bpf(): improve map and program compatibility Allow passing a name for maps and programs and allow retrieving it via BPF_OBJ_GET_INFO_BY_FD. This requires a bunch of glue code because the bpf_prog_info, etc. structs are not compatible with Linux. * Fix test failure due to incorrect link type * Address feedback from Dave Thaler * Fix second test failure due to wrong link type * Use program ID 0 on detached link ids Internally both zero and EBPF_ID_NONE are used to refer to non-existing ID. Use zero when retrieving link info, since that aligns with Linux better. * Temporarily use BPF_LINK_TYPE_UNSPEC * Only test program info if JIT is enabled * Apply suggestions from dthaler's review Co-authored-by: Dave Thaler <dthaler1968@gmail.com> --------- Co-authored-by: Dave Thaler <dthaler1968@gmail.com>
- Loading branch information
Showing
13 changed files
with
396 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.