]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: selftests: Add dctcp fallback test
authorMartin KaFai Lau <kafai@fb.com>
Tue, 24 Aug 2021 17:30:26 +0000 (10:30 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 26 Aug 2021 00:40:35 +0000 (17:40 -0700)
commit9039a2a153fb1894e0be9bdf92434ff17b1c6e91
treecad9561b3fc80ffe9254a66bcf36159a0d5141c8
parent47ae676269bb25ab65cd4f786eb3c2cefe473053
bpf: selftests: Add dctcp fallback test

This patch makes the bpf_dctcp test to fallback to cubic by
using setsockopt(TCP_CONGESTION) when the tcp flow is not
ecn ready.

It also checks setsockopt() is not available to release().

The settimeo() from the network_helpers.h is used, so the local
one is removed.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210824173026.3979130-1-kafai@fb.com
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/progs/bpf_dctcp.c
tools/testing/selftests/bpf/progs/bpf_dctcp_release.c [new file with mode: 0644]