1. 12 5月, 2014 2 次提交
    • A
      net: filter: additional BPF tests · 9def624a
      Alexei Starovoitov 提交于
      All tests should pass with and without JIT.
      
      Example output:
      test_bpf: #0 TAX 35 16 16 PASS
      test_bpf: #1 TXA 7 7 7 PASS
      test_bpf: #2 ADD_SUB_MUL_K 10 PASS
      test_bpf: #3 DIV_KX 33 PASS
      test_bpf: #4 AND_OR_LSH_K 10 10 PASS
      test_bpf: #5 LD_IND 8 8 8 PASS
      test_bpf: #6 LD_ABS 8 8 8 PASS
      test_bpf: #7 LD_ABS_LL 13 14 PASS
      test_bpf: #8 LD_IND_LL 12 12 12 PASS
      test_bpf: #9 LD_ABS_NET 10 12 PASS
      test_bpf: #10 LD_IND_NET 11 12 12 PASS
      ...
      
      Numbers are times in nsec per filter for given input data.
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9def624a
    • A
      net: filter: BPF testsuite · 64a8946b
      Alexei Starovoitov 提交于
      The testsuite covers classic and internal BPF instructions.
      It is particularly useful for JIT compiler developers.
      Adds to "net" selftest target.
      
      The testsuite can be used as a set of micro-benchmarks.
      It measures execution time of each BPF program in nsec.
      
      This patch adds core framework.
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64a8946b