Re: Cannot load eBPF program as XDP

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

 



On 06/29/2017 12:40 AM, MD I. Islam wrote:
On Wed, Jun 28, 2017 at 5:04 AM, Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote:
On 06/28/2017 04:32 AM, MD I. Islam wrote:
On Tue, Jun 27, 2017 at 10:05 PM, Y Song <ys114321@xxxxxxxxx> 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.



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux