Re: xdp/bpf application getting unexpected ENOTSOCK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have just tried running the test case again, in a freshly-installed
Ubuntu 22.10 VM. I have checked out the 'latest' xdp-project/xdp-tools
and run 'make install' for libbpf and libxdp.
This time I get a trace which ends with
+ export LD_LIBRARY_PATH=/usr/local/lib
+ LD_LIBRARY_PATH=/usr/local/lib
+ ns2_pid=6487
+ sleep 20
+ ./af_xdp_user -S -d vpeer2 -Q 1 --filename ./af_xdp_kern.o
main cfg.filename=./af_xdp_kern.o
main Opening program file ./af_xdp_kern.o
libxdp: Couldn't find xdp program in bpf object
main xdp_prog=0xfffffffffffffffe

What am I doing wrong?

Chris Ward, IBM

On Thu, 24 Nov 2022 at 10:25, Chris Ward <tjcw01@xxxxxxxxx> wrote:
>
> I am writing a bpf/xdp example which I hope to put in
> xdp-project/bpf-examples when it is done. But I am finding that I get
> an unexpected ENOTSOCK return code from a bpf_map_update_elem function
> call. My test case is here
> https://github.com/tjcw/bpf-examples/tree/tjcw-integration-0.3/AF_XDP-filter
> ; see its README.md for what it does.
>
> I have a matching test case here
> https://github.com/tjcw/xdp-tutorial/tree/master/ebpf-filter which
> works normally.
>
> The problem may be a diffent libbpf level; the AF_XDP_filter version
> of the test case is running with libbpf set up by "git submodule
> update --init", where the ebpf-filter version has libbpf set up by the
> 'bleeding edge' libbpf being checked out at ~tjcw/workspace. I will
> try again with more careful version control.
>
> The last few lines written by the test case are
> libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> xsk_socket__create_shared_named_prog returns 0
> bpf_map_update_elem(9,0x7ffcaea02670,0x7ffcaea02674,0)
> bpf_map_update_elem returns -88
> ERROR: Cannot set up socket 0
> ERROR: Can't setup AF_XDP sockets "Socket operation on non-socket"
>
> the full log of the test case is available here
> https://github.com/libbpf/libbpf/issues/630
>
> Thanks for any light you can throw on the issue !
>
> Chris Ward, IBM



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux