From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Nick Viljoen <nick.viljoen@netronome.com>,
oss-drivers@netronome.com, netdev@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
jhsiao@redhat.com, Quentin Monnet <quentin.monnet@netronome.com>
Subject: Re: [oss-drivers] Re: [RFC bpf-next PATCH] samples/bpf: xdp1 add XDP hardware offload option
Date: Tue, 4 Sep 2018 18:59:57 +0200 [thread overview]
Message-ID: <20180904185957.0d344534@cakuba> (raw)
In-Reply-To: <20180904184933.5ff1ed19@redhat.com>
On Tue, 4 Sep 2018 18:49:33 +0200, Jesper Dangaard Brouer wrote:
> On Tue, 4 Sep 2018 17:09:12 +0200
> Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
>
> > On Tue, 04 Sep 2018 16:59:19 +0200, Jesper Dangaard Brouer wrote:
> > > Trying to use XDP hardware offloading via XDP_FLAGS_HW_MODE
> > > and setting the ifindex in prog_load_attr.ifindex before
> > > loading the BPF code via bpf_prog_load_xattr().
> > >
> > > This unfortunately does not seem to work...
> > > - Am I doing something wrong?
> > >
> > > Notice, I also disable the map BPF_MAP_TYPE_PERCPU_ARRAY
> > > to make sure it was not related to the map (not supporting
> > > offloading).
> > >
> > > Failed with:
> > > # ./xdp1 -O $(</sys/class/net/enp130s0np1/ifindex)
> > > libbpf: load bpf program failed: Invalid argument
> > > libbpf: failed to load program 'xdp1'
> > > libbpf: failed to load object './xdp1_kern.o'
> > >
> > > Tested on kernel 4.18.0-2.el8.x86_64 with driver nfp
> > > Ethernet controller: Netronome Systems, Inc. Device 4000
> >
> > Are you running the BPF capable FW?
> >
> > https://help.netronome.com/support/solutions/articles/36000050009-agilio-ebpf-2-0-6-extended-berkeley-packet-filter
>
> I'm likely not running the correct firmware...
>
> Can you tell me, with the ethtool -i output, if I'm running the
> appropriate firmware?
>
> # ethtool -i enp129s0np1
> driver: nfp
> version: 4.18.0-2.el8.x86_64 SMP mod_unl
> firmware-version: 0.0.3.5 0.21 nic-2.0.7 nic
> expansion-rom-version:
> bus-info: 0000:81:00.0
> supports-statistics: yes
> supports-test: no
> supports-eeprom-access: no
> supports-register-dump: yes
> supports-priv-flags: no
Yup, the BPF firmware says bpf in firmware version.
> If this is a firmware version case, then we should really improve the
> errors we are giving the user, the -EINVAL can be anything.
>
> "libbpf: load bpf program failed: Invalid argument"
That is true.
next prev parent reply other threads:[~2018-09-04 21:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 14:59 [RFC bpf-next PATCH] samples/bpf: xdp1 add XDP hardware offload option Jesper Dangaard Brouer
2018-09-04 15:09 ` Jakub Kicinski
2018-09-04 16:49 ` Jesper Dangaard Brouer
2018-09-04 16:59 ` Jakub Kicinski [this message]
2018-09-05 13:41 ` [oss-drivers] " Jesper Dangaard Brouer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180904185957.0d344534@cakuba \
--to=jakub.kicinski@netronome.com \
--cc=brouer@redhat.com \
--cc=jhsiao@redhat.com \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=nick.viljoen@netronome.com \
--cc=oss-drivers@netronome.com \
--cc=quentin.monnet@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).