bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jose.marchesi@oracle.com (Jose E. Marchesi)
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	bpf@vger.kernel.org, Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: add bpf-gcc support
Date: Wed, 11 Sep 2019 12:30:44 +0200	[thread overview]
Message-ID: <8736h3nn6g.fsf@oracle.com> (raw)
In-Reply-To: <20190910234140.53363-1-iii@linux.ibm.com> (Ilya Leoshkevich's message of "Wed, 11 Sep 2019 00:41:40 +0100")


Hi Ilya.

    Now that binutils and gcc support for BPF is upstream, make use of it in
    BPF selftests using alu32-like approach. Share as much as possible of
    CFLAGS calculation with clang.

    In order to activate the new bpf-gcc support, one needs to configure
    binutils and gcc with --target=bpf and make them available in $PATH. In
    particular, gcc must be installed as `bpf-gcc`, which is the default.
    
    Right now with binutils 25a2915e8dba and gcc r275589 only a handful of
    tests work:
    
    	# ./test_progs_bpf_gcc
    	Summary: 5/39 PASSED, 1 SKIPPED, 100 FAILED
    
    The reason is that a lot of progs fail to build with the following
    errors:
    
    	error: indirect call in function, which are not supported by eBPF
    	error: too many function arguments for eBPF
    
    The next step is to understand those issues and fix them.

Will install your patch and take a look.

Maybe GCC is not inlining something it should be inlining, or clang may
be silently generating callx %reg instructions, or maybe there are bugs
in my diagnostics... in any case this is useful feedback :)

Thanks!

  reply	other threads:[~2019-09-11 10:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 23:41 [PATCH bpf-next] selftests/bpf: add bpf-gcc support Ilya Leoshkevich
2019-09-11 10:30 ` Jose E. Marchesi [this message]
2019-09-11 11:12   ` Ilya Leoshkevich

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=8736h3nn6g.fsf@oracle.com \
    --to=jose.marchesi@oracle.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=iii@linux.ibm.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).