-
Notifications
You must be signed in to change notification settings - Fork 59
Add bpf_redirect_map for AF_XDP sockets #1008
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
Draft
mtfriesen
wants to merge
25
commits into
main
Choose a base branch
from
mtfriesen/ebpf_xsk_map
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
eb9d835
WIP
mtfriesen 79201b0
various bugfixes
mtfriesen 91a6c52
fixes/tests/improvements/regressions
mtfriesen 86cca98
add diagnostics and more test cases
mtfriesen 1eb95bd
handle prog_test_run case of redirect
mtfriesen a4705eb
add docs
mtfriesen ada7b21
update samples and test them
mtfriesen 577c2fd
fix build and deconflict with parallel built-in xskmap
mtfriesen 5a252ae
Merge remote-tracking branch 'origin/main' into mtfriesen/ebpf_xsk_map
mtfriesen 429dec3
Update eBPF dependency to v1.3.0
mtfriesen 6f5cd59
Adapt XSKMAP eBPF map provider to eBPF 1.3.0 API and install matching…
mtfriesen 5a128ff
Fix sample CI regressions and add redirect-decision diagnostics
mtfriesen 4afb49c
Enable eBPF in XDP for the eBPF sample tests
mtfriesen ad40969
Install eBPF before XDP in eBPF sample tests
mtfriesen 2600464
Increase sample test step timeout to 15 min for eBPF install/uninstall
mtfriesen 96f2ca5
Strengthen eBPF redirect diagnostics for arm64 fallback investigation
mtfriesen 79a77ef
Fix xskfwd sample cleanup hang; focus redirect diagnostics on fallbac…
mtfriesen bd83bd8
Merge remote-tracking branch 'origin/main' into mtfriesen/ebpf_xsk_map
mtfriesen d190f78
Force xdp uninstall in sample cleanup so post Check Drivers passes
mtfriesen b6aadc8
Gate eBPF XSKMAP tests on eBPF runtime >= 1.3.0
mtfriesen 68037c1
Fix arm64 redirect fallback via acquire/release ordering in XskCanRed…
mtfriesen b91e5bb
Revert ineffective XskCanRedirect acquire loads; instrument redirect …
mtfriesen 86f97e9
Capture bpf_redirect_map return action in redirect fallback diagnostic
mtfriesen 7b20b6b
Add kernel redirect-decision diagnostics + short ProgAction log line
mtfriesen 2ea77ba
Fix arm64 eBPF XSKMAP redirect fallback: init ProgTestRunContext on d…
mtfriesen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| # XDP_HOOK_ID structure | ||
|
|
||
| > **Deprecated:** The built-in rules-based program API is planned for removal. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert - hook ID applies more generally to XDP, not just the built-in rules engine. |
||
| > All users should migrate to eBPF programs. See the | ||
| > [eBPF Integration Guide](../ebpf.md) for migration instructions and examples. | ||
|
|
||
| Specifies an XDP hook point. | ||
|
|
||
| ## Syntax | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,7 @@ XDP for Windows is a high-performance packet processing framework inspired by Li | |||||
| - **Native XDP**: Requires NIC driver support for maximum performance and direct data path access. | ||||||
| - Provides programmable hook points for packet inspection, modification, and redirection. | ||||||
| - Implements shared memory rings for high-speed packet transfer between kernel and user mode. | ||||||
| - Supports eBPF (experimental) for programmable packet processing. | ||||||
| - Supports [eBPF](./ebpf.md) for programmable packet processing. | ||||||
|
|
||||||
| ### 2. XDP API Headers (User Mode APIs) | ||||||
| - Header-only APIs that expose the XDP API to applications (available for `XDP_API_VERSION_3` or later). | ||||||
|
|
@@ -48,7 +48,8 @@ XDP for Windows is a high-performance packet processing framework inspired by Li | |||||
| - The driver is signed and uses standard Windows security mechanisms. | ||||||
|
|
||||||
| ## Extensibility | ||||||
| - XDP for Windows is designed to be extensible via eBPF (experimental) and a primitive built-in rules-based program engine. | ||||||
| - XDP for Windows is designed to be extensible via [eBPF programs](./ebpf.md) through integration with [eBPF for Windows](https://github.com/microsoft/ebpf-for-windows). | ||||||
| - The legacy built-in rules-based program engine is deprecated and planned for removal. See the [eBPF Integration Guide](./ebpf.md) for migration guidance. | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - New hook points and interface types can be added as needed. | ||||||
|
|
||||||
| ## Comparison to Linux XDP | ||||||
|
|
@@ -60,6 +61,8 @@ XDP for Windows is a high-performance packet processing framework inspired by Li | |||||
| ## References | ||||||
| - [Usage Guide](./usage.md) | ||||||
| - [AF_XDP API](./afxdp.md) | ||||||
| - [eBPF Integration Guide](./ebpf.md) | ||||||
| - [eBPF Redirect Map (XSKMAP)](./ebpf-redirect-map.md) | ||||||
| - [FAQ](./faq.md) | ||||||
| - [Threat Model](./threat-model.md) | ||||||
|
|
||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Only sample_tests should be added here.