Re: [PATCH bpf-next] selftests/bpf: add bpf-gcc support

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

 



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!



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux