]> Gentwo Git Trees - linux/.git/commit
selftests/bpf: Test bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) when transport_header is...
authorMartin KaFai Lau <martin.lau@kernel.org>
Wed, 12 Nov 2025 23:23:31 +0000 (15:23 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Nov 2025 02:49:18 +0000 (18:49 -0800)
commit6cc73f35406cae1f053e984e8de40e6dc9681446
tree00949d8cfcf380517604cadad13c417f401775da
parentd946f3c98328171fa50ddb908593cf833587f725
selftests/bpf: Test bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) when transport_header is not set

Add a test to check that bpf_skb_check_mtu(BPF_MTU_CHK_SEGS) is
rejected (-EINVAL) if skb->transport_header is not set. The test
needs to lower the MTU of the loopback device. Thus, take this
opportunity to run the test in a netns by adding "ns_" to the test
name. The "serial_" prefix can then be removed.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20251112232331.1566074-2-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/check_mtu.c
tools/testing/selftests/bpf/progs/test_check_mtu.c