Skip to content

Commit 57dc6f3

Browse files
fomichevAlexei Starovoitov
authored andcommitted
selftests/bpf: Use reno instead of dctcp
Andrey pointed out that we can use reno instead of dctcp for CC tests and drop CONFIG_TCP_CONG_DCTCP=y requirement. Fixes: beecf11 ("bpf: Bpf_{g,s}etsockopt for struct bpf_sock_addr") Suggested-by: Andrey Ignatov <[email protected]> Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 138c676 commit 57dc6f3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tools/testing/selftests/bpf/config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ CONFIG_IPV6_SIT=m
3737
CONFIG_BPF_JIT=y
3838
CONFIG_BPF_LSM=y
3939
CONFIG_SECURITY=y
40-
CONFIG_TCP_CONG_DCTCP=y

tools/testing/selftests/bpf/progs/connect4_prog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ static __inline int verify_cc(struct bpf_sock_addr *ctx,
5959

6060
static __inline int set_cc(struct bpf_sock_addr *ctx)
6161
{
62-
char dctcp[TCP_CA_NAME_MAX] = "dctcp";
62+
char reno[TCP_CA_NAME_MAX] = "reno";
6363
char cubic[TCP_CA_NAME_MAX] = "cubic";
6464

65-
if (bpf_setsockopt(ctx, SOL_TCP, TCP_CONGESTION, &dctcp, sizeof(dctcp)))
65+
if (bpf_setsockopt(ctx, SOL_TCP, TCP_CONGESTION, &reno, sizeof(reno)))
6666
return 1;
67-
if (verify_cc(ctx, dctcp))
67+
if (verify_cc(ctx, reno))
6868
return 1;
6969

7070
if (bpf_setsockopt(ctx, SOL_TCP, TCP_CONGESTION, &cubic, sizeof(cubic)))

0 commit comments

Comments
 (0)