* Error running AF_XDP sample application
@ 2018-08-09 16:18 kdjimeli
2018-08-10 1:51 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: kdjimeli @ 2018-08-09 16:18 UTC (permalink / raw)
To: netdev
Hello,
I have been trying to test a sample AF_XDP program, but I have been
experiencing some issues.
After building the sample code
https://github.com/torvalds/linux/tree/master/samples/bpf,
when running the xdpsock binary, I get the errors
"libbpf: failed to create map (name: 'xsks_map'): Invalid argument"
"libbpf: failed to load object './xdpsock_kern.o"
I tried to figure out the cause of the error but all I know is that it
occurs at line 910 with the function
call "bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd)".
Please I would like to inquire what could be a possible for this error.
Thanks
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Error running AF_XDP sample application
2018-08-09 16:18 Error running AF_XDP sample application kdjimeli
@ 2018-08-10 1:51 ` Jakub Kicinski
2018-08-10 9:58 ` Konrad Djimeli
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2018-08-10 1:51 UTC (permalink / raw)
To: kdjimeli; +Cc: netdev
On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote:
> Hello,
>
> I have been trying to test a sample AF_XDP program, but I have been
> experiencing some issues.
> After building the sample code
> https://github.com/torvalds/linux/tree/master/samples/bpf,
> when running the xdpsock binary, I get the errors
> "libbpf: failed to create map (name: 'xsks_map'): Invalid argument"
> "libbpf: failed to load object './xdpsock_kern.o"
>
> I tried to figure out the cause of the error but all I know is that it
> occurs at line 910 with the function
> call "bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd)".
>
> Please I would like to inquire what could be a possible for this error.
which kernel version are you running?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Error running AF_XDP sample application
2018-08-10 1:51 ` Jakub Kicinski
@ 2018-08-10 9:58 ` Konrad Djimeli
2018-08-10 13:21 ` Konrad Djimeli
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Djimeli @ 2018-08-10 9:58 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, netdev-owner
On 2018-08-10 03:51, Jakub Kicinski wrote:
> On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote:
>> Hello,
>>
>> I have been trying to test a sample AF_XDP program, but I have been
>> experiencing some issues.
>> After building the sample code
>> https://github.com/torvalds/linux/tree/master/samples/bpf,
>> when running the xdpsock binary, I get the errors
>> "libbpf: failed to create map (name: 'xsks_map'): Invalid argument"
>> "libbpf: failed to load object './xdpsock_kern.o"
>>
>> I tried to figure out the cause of the error but all I know is that it
>> occurs at line 910 with the function
>> call "bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd)".
>>
>> Please I would like to inquire what could be a possible for this error.
>
> which kernel version are you running?
My kernel version is 4.18.0-rc8+. I cloned it from
https://github.com/torvalds/linux before building a running.
My commit head(git show-ref --head) is at
1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc HEAD
1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/heads/master
1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/remotes/origin/HEAD
1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/remotes/origin/master
...
I also applied the patch https://patchwork.ozlabs.org/patch/949884/
(samples: bpf: convert xdpsock_user.c to libbpf ), as the error was
initially in the form show below:
"failed to create a map: 22 Invalid argument"
"ERROR: load_bpf_file"
Thanks
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Error running AF_XDP sample application
2018-08-10 9:58 ` Konrad Djimeli
@ 2018-08-10 13:21 ` Konrad Djimeli
2018-08-10 15:45 ` Björn Töpel
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Djimeli @ 2018-08-10 13:21 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, netdev-owner
On 2018-08-10 11:58, Konrad Djimeli wrote:
> On 2018-08-10 03:51, Jakub Kicinski wrote:
>> On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote:
>>> Hello,
>>>
>>> I have been trying to test a sample AF_XDP program, but I have been
>>> experiencing some issues.
>>> After building the sample code
>>> https://github.com/torvalds/linux/tree/master/samples/bpf,
>>> when running the xdpsock binary, I get the errors
>>> "libbpf: failed to create map (name: 'xsks_map'): Invalid argument"
>>> "libbpf: failed to load object './xdpsock_kern.o"
>>>
>>> I tried to figure out the cause of the error but all I know is that it
>>> occurs at line 910 with the function
>>> call "bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd)".
>>>
>>> Please I would like to inquire what could be a possible for this error.
>>
>> which kernel version are you running?
>
> My kernel version is 4.18.0-rc8+. I cloned it from
> https://github.com/torvalds/linux before building a running.
>
> My commit head(git show-ref --head) is at
> 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc HEAD
> 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/heads/master
> 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/remotes/origin/HEAD
> 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/remotes/origin/master
> ...
>
>
> I also applied the patch https://patchwork.ozlabs.org/patch/949884/
> (samples: bpf: convert xdpsock_user.c to libbpf ), as the error was
> initially in the form show below:
> "failed to create a map: 22 Invalid argument"
> "ERROR: load_bpf_file"
>
> Thanks
> Konrad
Also other sample applications that make use of other bpf maps, such as
BPF_MAP_TYPE_CPUMAP in xdp_redirect_cpu work fine. But the application
with BPF_MAP_TYPE_XSKMAP fails producing the error mentioned above.
Thanks
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Error running AF_XDP sample application
2018-08-10 13:21 ` Konrad Djimeli
@ 2018-08-10 15:45 ` Björn Töpel
2018-08-10 21:02 ` Konrad Djimeli
0 siblings, 1 reply; 6+ messages in thread
From: Björn Töpel @ 2018-08-10 15:45 UTC (permalink / raw)
To: kdjimeli; +Cc: Jakub Kicinski, Netdev, netdev-owner
Den fre 10 aug. 2018 kl 15:23 skrev Konrad Djimeli <kdjimeli@igalia.com>:
>
> On 2018-08-10 11:58, Konrad Djimeli wrote:
> > On 2018-08-10 03:51, Jakub Kicinski wrote:
> >> On Thu, 09 Aug 2018 18:18:08 +0200, kdjimeli wrote:
> >>> Hello,
> >>>
> >>> I have been trying to test a sample AF_XDP program, but I have been
> >>> experiencing some issues.
> >>> After building the sample code
> >>> https://github.com/torvalds/linux/tree/master/samples/bpf,
> >>> when running the xdpsock binary, I get the errors
> >>> "libbpf: failed to create map (name: 'xsks_map'): Invalid argument"
> >>> "libbpf: failed to load object './xdpsock_kern.o"
> >>>
> >>> I tried to figure out the cause of the error but all I know is that it
> >>> occurs at line 910 with the function
> >>> call "bpf_prog_load_xattr(&prog_load_attr, &obj, &prog_fd)".
> >>>
> >>> Please I would like to inquire what could be a possible for this error.
> >>
> >> which kernel version are you running?
> >
> > My kernel version is 4.18.0-rc8+. I cloned it from
> > https://github.com/torvalds/linux before building a running.
> >
> > My commit head(git show-ref --head) is at
> > 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc HEAD
> > 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/heads/master
> > 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/remotes/origin/HEAD
> > 1236568ee3cbb0d3ac62d0074a29b97ecf34cbbc refs/remotes/origin/master
> > ...
> >
> >
> > I also applied the patch https://patchwork.ozlabs.org/patch/949884/
> > (samples: bpf: convert xdpsock_user.c to libbpf ), as the error was
> > initially in the form show below:
> > "failed to create a map: 22 Invalid argument"
> > "ERROR: load_bpf_file"
> >
> > Thanks
> > Konrad
>
> Also other sample applications that make use of other bpf maps, such as
> BPF_MAP_TYPE_CPUMAP in xdp_redirect_cpu work fine. But the application
> with BPF_MAP_TYPE_XSKMAP fails producing the error mentioned above.
>
> Thanks
> Konrad
Thanks for taking AF_XDP for a spin!
Before I start digging into details; Do you have CONFIG_XDP_SOCKETS=y
in your config? :-)
Björn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Error running AF_XDP sample application
2018-08-10 15:45 ` Björn Töpel
@ 2018-08-10 21:02 ` Konrad Djimeli
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Djimeli @ 2018-08-10 21:02 UTC (permalink / raw)
To: Björn Töpel; +Cc: Jakub Kicinski, Netdev
> On 2018-08-10 17:45, Björn Töpel wrote:
> Thanks for taking AF_XDP for a spin!
Thanks, I am actually an Igalia Coding Experience participant working
remotely from Cameroon in Africa and I am working on making use of
AF_XDP within Snabb. I am currently trying to familiarize myself with
XDP and AF_XDP, I also hope to make contributions to the
development/implementation of AF_XDP.
>
> Before I start digging into details; Do you have CONFIG_XDP_SOCKETS=y
> in your config? :-)
Yay!, setting CONFIG_XDP_SOCKETS=y in my config resolved every issue,
and it now works fine.
>
> Björn
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-08-10 23:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 16:18 Error running AF_XDP sample application kdjimeli
2018-08-10 1:51 ` Jakub Kicinski
2018-08-10 9:58 ` Konrad Djimeli
2018-08-10 13:21 ` Konrad Djimeli
2018-08-10 15:45 ` Björn Töpel
2018-08-10 21:02 ` Konrad Djimeli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.