xdp-newbies.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Sowmini Varadhan <sowmini05@gmail.com>
Cc: brouer@redhat.com,
	"xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: building eBPF
Date: Mon, 27 Apr 2020 12:03:33 +0200	[thread overview]
Message-ID: <20200427120333.7e6cedfc@carbon> (raw)
In-Reply-To: <20200427002027.GE488@gmail.com>

On Sun, 26 Apr 2020 20:20:27 -0400
Sowmini Varadhan <sowmini05@gmail.com> wrote:

> With the latest iproute2 (built from master, 'ip -V' reports
> iproute2-ss200330) when I try to run tc_l2_redirect.sh
> I get errors like the following. What am I missing?

The iproute2 BPF-loader does not support BTF.  I think upstream agrees
that it would be too much work to add (and maintain) it, so the current
plan[1] is to convert iproute2 to use libbpf instead.

Also notice that BPF-map layout is not compatible with libbpf.  Thus,
yet another hint not to use iproute2 to load XDP programs. (Toke have
done some initial work with libbpf maps, that will allow us AFAIK to be
backward compatible when converting iproute2 to libbpf).

Why do you want to use 'tc' to load XDP?


The XDP-tutorial[2] shows how to use libbpf from your C-programs, and
XDP-tools[3] contains a xdp-loader that you can use instead.

[1] https://xdp-project.net/#Port-iproute2-to-libbpf
[2] https://github.com/xdp-project/xdp-tutorial
[3] https://github.com/xdp-project/xdp-tools/tree/master/xdp-loader


> (full transcript of output from run is in the run.out attachment)
> 
>   :
> + tc filter add dev ve2 ingress bpf da obj ./tc_l2_redirect_kern.o sec l2_to_iptun_ingress_forward
> 
> BTF debug data section '.BTF' rejected: Invalid argument (22)!
>  - Length:       3554

I actually think this is only a warning, and the program is actually
loaded...

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

  reply	other threads:[~2020-04-27 10:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200425122225.GA455@gmail.com>
2020-04-25 12:56 ` building eBPF Jesper Dangaard Brouer
2020-04-25 16:16   ` David Ahern
2020-04-25 16:34   ` Sowmini Varadhan
2020-04-27 10:46     ` Toke Høiland-Jørgensen
2020-04-27  0:20   ` Sowmini Varadhan
2020-04-27 10:03     ` Jesper Dangaard Brouer [this message]
2020-04-27 10:49       ` Sowmini Varadhan
2020-04-27 12:08         ` Daniel Borkmann

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=20200427120333.7e6cedfc@carbon \
    --to=brouer@redhat.com \
    --cc=sowmini05@gmail.com \
    --cc=stephen@networkplumber.org \
    --cc=toke@redhat.com \
    --cc=xdp-newbies@vger.kernel.org \
    /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).