-
Notifications
You must be signed in to change notification settings - Fork 206
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
UM API to write into a ring buffer map. #3562
base: main
Are you sure you want to change the base?
Conversation
@@ -39,6 +39,7 @@ typedef enum _ebpf_operation_id | |||
EBPF_OPERATION_BIND_MAP, | |||
EBPF_OPERATION_RING_BUFFER_MAP_QUERY_BUFFER, | |||
EBPF_OPERATION_RING_BUFFER_MAP_ASYNC_QUERY, | |||
EBPF_OPERATION_RING_BUFFER_MAP_WRITE_DATA, |
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.
nit: should we insert new values in the middle of the list? That will change the operation IDs for the rest of the enums.
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.
Since the ebpf API will always ship in conjunction with the ebpf core.sys, why is this a problem?
This comment was marked as resolved.
This comment was marked as resolved.
Per email thread with Andrii, the correct map type is
|
Based on a brief examination of the BPF_MAP_TYPE_USER_RINGBUF map type, I think this will require some heavy lifting from the verifier and/or slightly different implementation in Windows.
|
Description
Addressess #3572.
Add a new API in eBPF API.dll to write into a ring buffer map from user mode. This API issues an IOCTL which calls
bpf_ring_buffer_output
function to write user specified data into the ring buffer.Testing
Updated unit and api tests to write messages into ring buffer interleaved with events that invoke eBPF programs (which in turn write into the same ring buffer).
Documentation
No documentation impact.
Installation
No installation impact.