]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add test for bpf_get_link_xdp_id
authorAndrey Ignatov <rdna@fb.com>
Tue, 7 Apr 2020 05:09:46 +0000 (22:09 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 7 Apr 2020 23:35:24 +0000 (01:35 +0200)
commit970d87eab7546cb9d67447529222b0fbed243540
tree57c44245c09f97a5267d390fe641fa8ab134cff5
parentab35b9c552b07bd5660eaf666d0d5ad0b24f6195
selftests/bpf: Add test for bpf_get_link_xdp_id

Add xdp_info selftest that makes sure that bpf_get_link_xdp_id returns
valid prog_id for different input modes:

  * w/ and w/o flags when no program is attached;
  * w/ and w/o flags when one program is attached.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/2a9a6d1ce33b91ccc1aa3de6dba2d309f2062811.1586236080.git.rdna@fb.com
tools/testing/selftests/bpf/prog_tests/xdp_info.c [new file with mode: 0644]