1. 02 6月, 2020 1 次提交
  2. 16 5月, 2020 9 次提交
  3. 25 1月, 2020 1 次提交
  4. 29 11月, 2019 2 次提交
  5. 29 1月, 2019 1 次提交
  6. 29 11月, 2018 1 次提交
  7. 21 10月, 2018 1 次提交
    • J
      bpf: test_sockmap add options to use msg_push_data · 84fbfe02
      John Fastabend 提交于
      Add options to run msg_push_data, this patch creates two more flags
      in test_sockmap that can be used to specify the offset and length
      of bytes to be added. The new options are --txmsg_start_push to
      specify where bytes should be inserted and --txmsg_end_push to
      specify how many bytes. This is analagous to the options that are
      used to pull data, --txmsg_start and --txmsg_end.
      
      In addition to adding the options tests are added to the test
      suit to run the tests similar to what was done for msg_pull_data.
      Signed-off-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      84fbfe02
  8. 17 10月, 2018 1 次提交
  9. 16 10月, 2018 2 次提交
  10. 29 8月, 2018 2 次提交
  11. 09 8月, 2018 1 次提交
  12. 22 6月, 2018 1 次提交
    • Y
      tools/bpf: fix test_sockmap failure · 3e1a61b3
      Yonghong Song 提交于
      On one of our production test machine, when running
      bpf selftest test_sockmap, I got the following error:
        # sudo ./test_sockmap
        libbpf: failed to create map (name: 'sock_map'): Operation not permitted
        libbpf: failed to load object 'test_sockmap_kern.o'
        libbpf: Can't get the 0th fd from program sk_skb1: only -1 instances
        ......
        load_bpf_file: (-1) Operation not permitted
        ERROR: (-1) load bpf failed
      
      The error is due to not-big-enough rlimit
        struct rlimit r = {10 * 1024 * 1024, RLIM_INFINITY};
      
      The test already includes "bpf_rlimit.h", which sets current
      and max rlimit to RLIM_INFINITY. Let us just use it.
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      3e1a61b3
  13. 02 6月, 2018 5 次提交
  14. 17 5月, 2018 1 次提交
  15. 25 4月, 2018 4 次提交
    • J
      bpf: reduce runtime of test_sockmap tests · a18fda1a
      John Fastabend 提交于
      When test_sockmap was running outside of selftests and was not being
      run by build bots it was reasonable to spend significant amount of
      time running various tests. The number of tests is high because many
      different I/O iterators are run.
      
      However, now that test_sockmap is part of selftests rather than
      iterate through all I/O sides only test a minimal set of min/max
      values along with a few "normal" I/O ops. Also remove the long
      running tests. They can be run from other test frameworks on a regular
      cadence.
      
      This significanly reduces runtime of test_sockmap.
      
      Before:
      
      $ time sudo ./test_sockmap  > /dev/null
      
      real    4m47.521s
      user    0m0.370s
      sys     0m3.131s
      
      After:
      
      $ time sudo ./test_sockmap  > /dev/null
      
      real    0m0.514s
      user    0m0.104s
      sys     0m0.430s
      
      The CLI is still available for users that want to test the long
      running tests that do the larger send/recv tests.
      Signed-off-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      a18fda1a
    • J
      bpf: sockmap, add selftests · 16962b24
      John Fastabend 提交于
      This adds a new test program test_sockmap which is the old sample
      sockmap program. By moving the sample program here we can now run it
      as part of the self tests suite. To support this a populate_progs()
      routine is added to load programs and maps which was previously done
      with load_bpf_file(). This is needed because self test libs do not
      provide a similar routine. Also we now use the cgroup_helpers
      routines to manage cgroup use instead of manually creating one and
      supplying it to the CLI.
      
      Notice we keep the CLI around though because it is useful for dbg
      and specialized testing.
      
      To run use ./test_sockmap and the result should be,
      
      Summary 660 PASSED, 0 SKIPPED, 0 FAILED
      Signed-off-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      16962b24
    • J
      bpf: sockmap, add a set of tests to run by default · 5d9ffeae
      John Fastabend 提交于
      If no options are passed to sockmap after this patch we run a set of
      tests using various options and sendmsg/sendpage sizes. This replaces
      the sockmap_test.sh script.
      Signed-off-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      5d9ffeae
    • J
      bpf: sockmap, code sockmap_test in C · 15f66a91
      John Fastabend 提交于
      By moving sockmap_test from shell script into C we can run it directly
      from selftests, but we can also push the input/output around in proper
      structures.
      
      However, keep the CLI options around because they are useful for
      debugging when a paticular pattern of msghdr or sockmap options
      trips up the sockmap code path.
      Signed-off-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      15f66a91
  16. 30 3月, 2018 2 次提交
  17. 20 3月, 2018 5 次提交