-
Notifications
You must be signed in to change notification settings - Fork 685
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
Fixed #1635 - xsk.h should be taken from libxdp #1703
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1703 +/- ##
==========================================
+ Coverage 83.13% 83.58% +0.45%
==========================================
Files 279 275 -4
Lines 48395 47763 -632
Branches 10246 10074 -172
==========================================
- Hits 40231 39924 -307
+ Misses 7042 6735 -307
+ Partials 1122 1104 -18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -5,7 +5,7 @@ | |||
#include "Logger.h" | |||
#include "Packet.h" | |||
#include <bpf/libbpf.h> | |||
#include <bpf/xsk.h> | |||
#include <xdp/xsk.h> |
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.
Can you explain why we need "xdp" instead of "bpf" here?
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.
Can you explain why we need "xdp" instead of "bpf" here?
On my systems there is no such header. Same is here: #1635.
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.
@hoxnox I think we may need to add some conditions here instead of changing the code directly. What's your system? Maybe just add a special case for handling your system?
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.
@hoxnox I think we may need to add some conditions here instead of changing the code directly. What's your system? Maybe just add a special case for handling your system?
I don't understand why in your system "xsk.h" present. There is no such at https://github.com/libbpf/libbpf and no such in kernel tree https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf?h=v6.14-rc1
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.
I think it might based on how and where you install it. I saw people using <bpf/xsk.h>
, <xdp/xsk.h>
, and <linux/xsk.h>
. Maybe we need a better way to find the corret one for the user system.
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.
I think it might based on how and where you install it. I saw people using
<bpf/xsk.h>
,<xdp/xsk.h>
, and<linux/xsk.h>
. Maybe we need a better way to find the corret one for the user system.
I'll try to figure it out and return with more accurate patch.
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.
Between 5.15.178 and 6.1.128 xsk.h was moved from tools/lib/bpf/xsk.h
to tools/testing/selftests/bpf/xsk.h
and it is not part of linux-headers. So regular user with kernel 6+ doesn't have that header.
Added FindXDP.cmake, corrected CMakeLists and changed bpf/xsk.h to xdp/xsk.h.
This is fix for #1635.