OpenCloudOS-Kernel/tools/testing/selftests/net
Daniel Borkmann 3c2c3c16aa reuseport, bpf: add test case for bpf_get_numa_node_id
The test case is very similar to reuseport_bpf_cpu, only that here
we select socket members based on current numa node id.

  # numactl -H
  available: 2 nodes (0-1)
  node 0 cpus: 0 1 2 3 4 5 12 13 14 15 16 17
  node 0 size: 128867 MB
  node 0 free: 120080 MB
  node 1 cpus: 6 7 8 9 10 11 18 19 20 21 22 23
  node 1 size: 96765 MB
  node 1 free: 87504 MB
  node distances:
  node   0   1
    0:  10  20
    1:  20  10

  # ./reuseport_bpf_numa
  ---- IPv4 UDP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  ---- IPv6 UDP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  ---- IPv4 TCP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  ---- IPv6 TCP ----
  send node 0, receive socket 0
  send node 1, receive socket 1
  send node 1, receive socket 1
  send node 0, receive socket 0
  SUCCESS

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-22 17:05:52 -04:00
..
.gitignore reuseport, bpf: add test case for bpf_get_numa_node_id 2016-10-22 17:05:52 -04:00
Makefile reuseport, bpf: add test case for bpf_get_numa_node_id 2016-10-22 17:05:52 -04:00
config selftests: create test-specific kconfig fragments 2016-02-25 09:47:52 -07:00
psock_fanout.c selftests/net: test extended BPF fanout mode 2015-08-17 14:22:48 -07:00
psock_lib.h selftests/net: test classic bpf fanout mode 2015-08-17 14:22:48 -07:00
psock_tpacket.c tools: selftests: psock_tpacket: get rid of macro wrappers 2013-07-02 00:23:57 -07:00
reuseport_bpf.c soreuseport: Fix reuseport_bpf testcase on 32bit architectures 2016-06-06 15:20:16 -07:00
reuseport_bpf_cpu.c soreuseport: BPF selection functional test for TCP 2016-02-11 03:54:15 -05:00
reuseport_bpf_numa.c reuseport, bpf: add test case for bpf_get_numa_node_id 2016-10-22 17:05:52 -04:00
reuseport_dualstack.c soreuseport: test mixed v4/v6 sockets 2016-04-14 21:14:04 -04:00
run_afpackettests selftests: Introduce minimal shared logic for running tests 2015-03-13 15:13:40 -06:00
run_netsocktests selftests: Introduce minimal shared logic for running tests 2015-03-13 15:13:40 -06:00
socket.c
test_bpf.sh selftests/net: move test out of Makefile into a shell script 2014-11-05 08:12:40 -07:00