OSDN Git Service

selftests/bpf: Extend test_flow_dissector to cover link creation
authorJakub Sitnicki <jakub@cloudflare.com>
Sun, 31 May 2020 08:28:46 +0000 (10:28 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 22:21:03 +0000 (15:21 -0700)
commit06716e04a043aa5e010f952a823ad038054b0e5c
tree1edf7a1b44dac5062702fea067e9d9e94cf02c3e
parentb4b8a3bf9ef0fbbf343b624d68ea328dd4edd5c4
selftests/bpf: Extend test_flow_dissector to cover link creation

Extend the existing flow_dissector test case to run tests once using direct
prog attachments, and then for the second time using indirect attachment
via link.

The intention is to exercises the newly added high-level API for attaching
programs to network namespace with links (bpf_program__attach_netns).

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