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

Fix the example of XDP and uprobe, adding XDP support for the rust runtime #126

Merged
merged 4 commits into from
Jun 27, 2023

Conversation

Officeyutong
Copy link
Contributor

@Officeyutong Officeyutong commented Jun 27, 2023

Closes #121

This PR adds xdp support for the rust runtime. Passing the interface name through attach_target, then the the program will be handled by program.attach_xdp

It also fixed a bug caused by eunomia-bpf/wasm-bpf-guest-sdk-c#1 . The test script of XDP example is wrong. It doesn't pass the ifname as argument, thus the wasm_attach_bpf_program will receive an invalid pointer of attach_target, which makes the attaching failed. uprobe has similar problems, and has been fixed now

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #126 (2f23c9f) into main (00a55d9) will decrease coverage by 0.97%.
The diff coverage is 14.63%.

❗ Current head 2f23c9f differs from pull request most recent head 4f5e154. Consider uploading reports for the commit 4f5e154 to get more accurate results

@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
- Coverage   79.61%   78.65%   -0.97%     
==========================================
  Files          14       14              
  Lines        1310     1335      +25     
==========================================
+ Hits         1043     1050       +7     
- Misses        267      285      +18     
Impacted Files Coverage Δ
runtime/wasm-bpf-rs/src/bpf/attach.rs 40.27% <14.63%> (-12.92%) ⬇️

... and 1 file with indirect coverage changes

@Officeyutong Officeyutong marked this pull request as ready for review June 27, 2023 15:01
@Officeyutong Officeyutong marked this pull request as draft June 27, 2023 15:04
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jun 27, 2023
@Officeyutong Officeyutong changed the title Add XDP support for rust runtime Fix the example of XDP and uprobe, adding XDP support for the rust runtime Jun 27, 2023
@Officeyutong Officeyutong marked this pull request as ready for review June 27, 2023 16:42
@Officeyutong Officeyutong merged commit cd836aa into eunomia-bpf:main Jun 27, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Missing xdp support for wasm-bpf-rs
2 participants