On 30/06/17 19:15, Alexei Starovoitov wrote:
On 6/30/17 9:44 AM, Edward Cree wrote:After two days' wrestling with clang's build system, I'm finally able to
I haven't measured the test_progs ones, because I *still* haven't gotten
around to actually setting up a BPF toolchain (it doesn't help that I'm
building everything on a test server that gets reimaged every night to
run our nightly tests...).
then you're missing a lot of tests then...
installing llvm is trivial. On x86 there are plenty of pre-built
packages that you can apt-get or yum.
Dave had to compile llvm and gcc from source on sparc, so volatile test
server isn't really an excuse to miss all these tests ;)
especially for such large verifier change.
run test_progs, and all its tests pass as of the full patch series.
Here are the processed insn counts:
Program net-next short full
test_pkt_access 78 79 79
test_xdp 386 411 407
test_l4lb 6438 4154 4154
test_tcp_estats 435 436 435
test_bpf_obj_id 8 8 8
test_pkt_md_access 41 42 42
"short" is the first 3 patches plus the 'roll back ptr&const' patch I
posted on Friday. "full" is the full 12-patch series. "Program" is
the function in test_progs.c.
I don't know why test_l4lb has to process _fewer_ insns with my patches;
if anything I'm worrying that I may be incorrectly pruning branches.
(I've spotted a possible bug in that I'm not looking at 'id' which,
although it doesn't have to match, if two regs in the old state had the
same id as each other, then those regs in the new state have to have
the same id as each other too.)
Also interesting is that going from "short" to "full" only decreases the
counts, suggesting that the ptr&const and full negative/positive
tracking isn't (at least for these test cases) costly.