-
Notifications
You must be signed in to change notification settings - Fork 1
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
Global variable support #886
Conversation
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 57 files out of 164 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Description
This pull request introduces several changes to the eBPF codebase, primarily focusing on adding support for global variable sections and resolving map value addresses. The changes span multiple files and include new functions, updates to existing structures, and modifications to metadata tables.
Enhancements to Global Variable Support:
include/bpf2c.h
: Addedglobal_variable_section_t
struct and a function pointer for retrieving global variable sections inmetadata_table_t
. [1] [2]tests/bpf2c_tests/expected/*
: Updated metadata tables in multiple test files to include the new global variable sections function. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Map Value Address Resolution:
libs/execution_context/ebpf_core.c
: Addedebpf_core_resolve_map_value_address
function to resolve map handles to addresses of the first value in the map.libs/execution_context/ebpf_core.h
: Declared the newebpf_core_resolve_map_value_address
function.libs/execution_context/ebpf_maps.c
: Addedebpf_map_get_value_address
function to get the address of the first value in an array map.libs/execution_context/ebpf_maps.h
: Declared the newebpf_map_get_value_address
function.Native Provider Enhancements:
libs/execution_context/ebpf_native.c
: Added fallback function for global variable sections and updated the provider attach callback to set this fallback if not provided. Implemented_ebpf_native_resolve_map_value_addresses
to handle the resolution of map value addresses and setup global variables during program load. (F3dca3c6L37R37, [1] [2] [3] [4]Miscellaneous:
libs/api/ebpf_api.cpp
: Added a comment regarding a fragile heuristic related tomap_entry_t
.tests/bpf2c_tests/expected/*
: Updated the version ofNPI_CLIENT_CHARACTERISTICS
to 1 and added a check for the provider registration instance version in multiple test files. [1] [2] [3] [4]Testing
CI/CD
Documentation
No.
Installation
No.