]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Convert test_flow_dissector to use BPF skeleton
authorJakub Sitnicki <jakub@cloudflare.com>
Sun, 31 May 2020 08:28:45 +0000 (10:28 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 22:21:03 +0000 (15:21 -0700)
commit0d6dd48216542b3233f4efeceb65e3adf1a006d5
treeeaf9771a8c2940eaaae4cb817fd602c306813f53
parent988bd31675aa1362a108f15caf94e1e0f2c3f501
selftests/bpf: Convert test_flow_dissector to use BPF skeleton

Switch flow dissector test setup from custom BPF object loader to BPF
skeleton to save boilerplate and prepare for testing higher-level API for
attaching flow dissector with bpf_link.

To avoid depending on program order in the BPF object when populating the
flow dissector PROG_ARRAY map, change the program section names to contain
the program index into the map. This follows the example set by tailcall
tests.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200531082846.2117903-12-jakub@cloudflare.com
tools/testing/selftests/bpf/prog_tests/flow_dissector.c
tools/testing/selftests/bpf/progs/bpf_flow.c