From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: "MD I. Islam" <tamim@csebuet.org>, Y Song <ys114321@gmail.com>,
xdp-newbies@vger.kernel.org, brouer@redhat.com
Subject: Re: Cannot load eBPF program as XDP
Date: Thu, 29 Jun 2017 19:42:52 +0200 [thread overview]
Message-ID: <20170629194252.5750b83d@redhat.com> (raw)
In-Reply-To: <595447AD.5040504@iogearbox.net>
On Thu, 29 Jun 2017 02:19:57 +0200
Daniel Borkmann <daniel@iogearbox.net> wrote:
> On 06/29/2017 12:40 AM, MD I. Islam wrote:
> > On Wed, Jun 28, 2017 at 5:04 AM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> >> On 06/28/2017 04:32 AM, MD I. Islam wrote:
> >>> On Tue, Jun 27, 2017 at 10:05 PM, Y Song <ys114321@gmail.com> wrote:
> >>>>
> >>>> xdp meta data is different:
> >>>>
> >>>> struct xdp_md {
> >>>> __u32 data;
> >>>> __u32 data_end;
> >>>> };
> >>>>
> >>>> All other fields available for skb metadata won't be available in XDP.
> >>>> That is way
> >>>> you get verification failure.
> >>>
> >>> Thanks for the quick reply! Now I'm trying xdp1_kern.c which uses
> >>> xdp_md. Now I'm getting the error:
> >>>
> >>> Note: 8 bytes struct bpf_elf_map fixup performed due to size mismatch!
> >>
> >> This one is harmless, just telling you that the native bpf_elf_map
> >> from iproute2 is different than the one you're loading, so it fixes
> >> up the remaining 8 bytes automatically.
> >>
> >>> RTNETLINK answers: Operation not supported
> >>
> >> This one seems likely that the driver you're trying to attach this to
> >> does not have XDP support. What's the driver you're using?
> >
> > Yes, I was using RTL8111 driver which doesn't support XDP. I will
> > eventually use Netronome NIC which will hopefully work.
> >
> > I'm facing the same problem in Mininet. Is there a way to use XDP in
> > Mininet? I am using Linux router in Mininet and I want to attach XDP
> > programs to virtual interfaces.
>
> You can use generic XDP, which will load also with drivers not
> supporting XDP natively (the fallback to generic XDP is transparent).
> It's part of 4.12 kernel.
Yes, exactly. With kernel 4.12 you can develop your XDP program, before
you get your hands on a NIC what have implemented the XDP eBPF-hook.
It is slower, compared here:
https://prototype-kernel.readthedocs.io/en/latest/blogposts/xdp25_eval_generic_xdp_tx.html
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2017-06-29 17:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 2:00 Cannot load eBPF program as XDP MD I. Islam
2017-06-28 2:05 ` Y Song
2017-06-28 2:32 ` MD I. Islam
2017-06-28 6:58 ` Y Song
2017-06-28 9:04 ` Daniel Borkmann
2017-06-28 22:40 ` MD I. Islam
2017-06-29 0:19 ` Daniel Borkmann
2017-06-29 17:42 ` Jesper Dangaard Brouer [this message]
2017-06-28 20:26 ` Jesper Dangaard Brouer
2017-06-29 0:09 ` MD I. Islam
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=20170629194252.5750b83d@redhat.com \
--to=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=tamim@csebuet.org \
--cc=xdp-newbies@vger.kernel.org \
--cc=ys114321@gmail.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 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.