Skip to content
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

XDP declarations are moved from ebpf_nethooks.h. #3793

Merged
merged 18 commits into from
Sep 6, 2024

Conversation

shpalani
Copy link
Collaborator

@shpalani shpalani commented Aug 27, 2024

Description

This PR contains:

  1. New file net_ebpf_xdp_hooks.h containing XDP headers and hooks.
  2. XDP headers and hooks removed in ebpf_nethooks.h.
  3. Docs changed to reflect the change.
  4. Test samples to include the new header file.

Additional details:

  • Remove support for the netebpfext's XDP hook in ebpf-for-windows #2974 moved XDP functionality to XDP_TEST in netebpfext. The second part involves removing XDP_TEST and its dependencies from ebpf-for-windows so that the xdp-for-windows extension can have its ebpf header and tests. This PR targets a temporary move of XDP headers and hooks until the dependent XDP_TEST imprints are removed in ebpf-for-windows. This helps xdp-for-windows extension (XDP must define its eBPF structs and helpers itself #613) to package a nupkg.
  • Also, this can be a breaking change for existing XDP_TEST external consumers. Hence, targeted v0.19.0.

Testing

_Do any existing tests cover this change? Yes
Are new tests needed? No

Documentation

_Is there any documentation impact for this change? Yes

Installation

_Is there any installer impact for this change? No.

@shpalani shpalani marked this pull request as ready for review August 28, 2024 00:35
@shpalani shpalani changed the title [Draft] XDP header declarations are moved from ebpf_nethooks.h XDP declarations are moved from ebpf_nethooks.h. Aug 28, 2024
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 86.57%. Comparing base (d7c7af6) to head (cb3606e).
Report is 270 commits behind head on main.

Files Patch % Lines
tests/end_to_end/helpers.h 12.50% 7 Missing ⚠️
netebpfext/net_ebpf_ext_xdp.c 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3793      +/-   ##
==========================================
+ Coverage   83.78%   86.57%   +2.78%     
==========================================
  Files         143      153      +10     
  Lines       27297    28802    +1505     
==========================================
+ Hits        22870    24934    +2064     
+ Misses       4427     3868     -559     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mtfriesen
mtfriesen previously approved these changes Aug 28, 2024
docs/tutorial.md Outdated Show resolved Hide resolved
include/ebpf_xdp_test_hooks.h Outdated Show resolved Hide resolved
include/ebpf_xdp_test_hooks.h Outdated Show resolved Hide resolved
include/bpf_helpers.h Outdated Show resolved Hide resolved
netebpfext/net_ebpf_ext_xdp.c Outdated Show resolved Hide resolved
tests/sample/unsafe/droppacket_unsafe.c Outdated Show resolved Hide resolved
tests/sample/droppacket.c Outdated Show resolved Hide resolved
tests/sample/unsafe/xdp_adjust_head_unsafe.c Show resolved Hide resolved
tests/sample/unsafe/xdp_datasize_unsafe.c Show resolved Hide resolved
tests/sample/xdp_invalid_socket_cookie.c Show resolved Hide resolved
@shpalani shpalani added this pull request to the merge queue Sep 6, 2024
Merged via the queue into microsoft:main with commit e4d425c Sep 6, 2024
88 checks passed
@shpalani shpalani deleted the shpalan/xdp-context branch September 6, 2024 23:03
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.

XDP header declarations belong in XDP-for-Windows repo, not eBPF-for-Windows
5 participants