Skip to content

Add attach opts to netevent ext#192

Merged
shankarseal merged 7 commits intomicrosoft:mainfrom
LakshK98:edge_traversal_support
Feb 27, 2025
Merged

Add attach opts to netevent ext#192
shankarseal merged 7 commits intomicrosoft:mainfrom
LakshK98:edge_traversal_support

Conversation

@LakshK98
Copy link
Contributor

Description

Added logic to handle capture type as an attach option provided by the attaching client. The capture type specifies the type of events that would be reported.

Testing

Unit tests added to test attaching options.

Documentation

NA

Installation

NA

@shankarseal shankarseal merged commit b5e0571 into microsoft:main Feb 27, 2025
25 checks passed
typedef enum _netevent_capture_type
{
NeteventCapture_All = 1,
NetevenCapture_Flow,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Neteven" - missing "t"

// Verifier feature proposal: https://github.com/vbpf/ebpf-verifier/issues/639
ExAcquirePushLockExclusive(&_ebpf_netevent_push_event_lock);
push_lock_acquired = true;
KIRQL oldIrql = ExAcquireSpinLockExclusive(&_ebpf_netevent_push_event_lock);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like ebpf_extension_hook_get_next_attached_client uses a push lock, which cannot be safely used at DISPATCH_LEVEL. The _ebpf_netevent_push_event callback will execute at IRLQ <= DISPATCH_LEVEL, so the design of the callback needs to take this into account. It seems like this was a missed detail when this callback code was originally written

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants