-
Notifications
You must be signed in to change notification settings - Fork 156
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
Map key size mismatch when using xdp-loader. #25
Comments
Yeah, xdp-tools assumes somewhat newer versions of most of the BPF infrastructure than the tutorial currently does, so these two are not quite compatible, I'm afraid. The map pinning issue just came up over on xdp-tutorial, actually; see xdp-project/xdp-tutorial#125 |
Thanks so much for your response. 😄 I didn't know about this issue. So I will now firstly finish the tutorial using the infrastructure provided in xdp-tutorial. And look at xdp-tools's implementation when I finish the tutorial (So after becoming a XDP advanced newbie 😉 ). |
Zuo Xiang <[email protected]> writes:
Thanks so much for your response. 😄 I didn't know about this
issue. So I will now firstly finish the tutorial using the
infrastructure provided in xdp-tutorial. And look at xdp-tools's
implementation when I finish the tutorial (So after becoming a XDP
advanced newbie 😉 ).
Sounds like a plan :)
|
* Changed UDS Timeout behaviour UDS Timeout will now be disabled with a value of -1. If it is set to 0 or unspecified, it will be set to the default value of 30. Any value between 30 and 300 will be accepted and remain as is. * Changed dockerfile to not include iproute2 iproute2 has been removed from the dockerfile as a potential sdl concern * Added semver range to image Go version Go version in image should now use latest 1.16 release of Go * Golint removed from Makefile Golint has been deprecated and superceded by Golangci-lint
Dear developers of xdp-tools,
Thanks so much for your great effort! I am a PhD student and want to implement something using XDP. Therefore, I successfully set up the development environment using xdp-tool and started to follow xdp-tutorial. I mainly want to use the
xdp-loader
provided by xdp-tool to make loading/unloading stuff easier. When tried basic04 in xdp-tutorial, thexdp-loader
does not work properly in pinning the map.I run following command to load the XDP program on lo interface with a given pin path. It works fine without error (I have checked with
xdp-loader status
).Then I can see the map file in
/sys/fs/bpf/programs/lo/xdp_pass
. Then I modified the xdp-stats.c to use/sys/fs/bpf/programs
aspin_dir
andxdp_pass
as the map name. Then I recompile thexdp_stats
and run it with following command:It shows the following error:
ERR: check_map_fd_info() Map key size(-677305523) mismatch expected size(4) ERR: map via FD not compatible
So the user space program can find the map file but the key size is wrong when calling
check_map_fd_info
. This example works fine when I use the xdp_loader.c instead of thexdp-loader
utility provided by the xdp-tools(xdp_loader.c
pins the maps in/sys/fs/bpf/lo/xdp_stats_map
).Am I doing something wrong here? Could you please give me some hints? Thanks so much for your help.
The text was updated successfully, but these errors were encountered: