]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Tests using bpf_check_mtu BPF-helper input mtu_len param
authorJesper Dangaard Brouer <brouer@redhat.com>
Mon, 8 Mar 2021 14:59:23 +0000 (15:59 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 8 Mar 2021 21:45:56 +0000 (22:45 +0100)
commit1255ae6e70d7394f6601b53d00364cfc82a58d7c
tree30f422e6b5bc6ec5c171d11851ee679ead594ec8
parent3a36afc184c4879cb4e8bab06914ce7336530922
selftests/bpf: Tests using bpf_check_mtu BPF-helper input mtu_len param

Add tests that use mtu_len as input parameter in BPF-helper
bpf_check_mtu().

The BPF-helper is avail from both XDP and TC context. Add two tests
per context, one that tests below MTU and one that exceeds the MTU.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/161521556358.3515614.5915221479709358964.stgit@firesoul
tools/testing/selftests/bpf/prog_tests/check_mtu.c
tools/testing/selftests/bpf/progs/test_check_mtu.c