bpf: selftests: Bpf_cubic and bpf_dctcp calling kernel functions
authorMartin KaFai Lau <kafai@fb.com>
Thu, 25 Mar 2021 01:52:46 +0000 (18:52 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 27 Mar 2021 03:41:52 +0000 (20:41 -0700)
commit78e60bbbe8e8f614b6a453d8a780d9e6f77749a8
treeb4016d6f0cee3eb8f9559e7f4ea5e8fac01b83fe
parent39cd9e0f6783fd2dd2b0e95500e34575b3707ed8
bpf: selftests: Bpf_cubic and bpf_dctcp calling kernel functions

This patch removes the bpf implementation of tcp_slow_start()
and tcp_cong_avoid_ai().  Instead, it directly uses the kernel
implementation.

It also replaces the bpf_cubic_undo_cwnd implementation by directly
calling tcp_reno_undo_cwnd().  bpf_dctcp also directly calls
tcp_reno_cong_avoid() instead.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210325015246.1551062-1-kafai@fb.com
tools/testing/selftests/bpf/bpf_tcp_helpers.h
tools/testing/selftests/bpf/progs/bpf_cubic.c
tools/testing/selftests/bpf/progs/bpf_dctcp.c