From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Djimeli Subject: Re: Error running AF_XDP sample application Date: Fri, 10 Aug 2018 11:58:47 +0200 Message-ID: <23a938260df3326eb036207f6e193f1b@igalia.com> References: <88ef46e09c2849ff89aae6bf1d1d8104@igalia.com> <20180809185100.588f33a1@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, netdev-owner@vger.kernel.org To: Jakub Kicinski Return-path: Received: from fanzine.igalia.com ([91.117.99.155]:41385 "EHLO fanzine.igalia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727206AbeHJM2C (ORCPT ); Fri, 10 Aug 2018 08:28:02 -0400 In-Reply-To: <20180809185100.588f33a1@cakuba.netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: 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