Skip to content

Commit

Permalink
selftests/bpf: Use reno instead of dctcp
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
fomichev authored and Alexei Starovoitov committed May 1, 2020
1 parent 138c676 commit 57dc6f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion tools/testing/selftests/bpf/config
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ CONFIG_IPV6_SIT=m
CONFIG_BPF_JIT=y
CONFIG_BPF_LSM=y
CONFIG_SECURITY=y
CONFIG_TCP_CONG_DCTCP=y
6 changes: 3 additions & 3 deletions tools/testing/selftests/bpf/progs/connect4_prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ static __inline int verify_cc(struct bpf_sock_addr *ctx,

static __inline int set_cc(struct bpf_sock_addr *ctx)
{
char dctcp[TCP_CA_NAME_MAX] = "dctcp";
char reno[TCP_CA_NAME_MAX] = "reno";
char cubic[TCP_CA_NAME_MAX] = "cubic";

if (bpf_setsockopt(ctx, SOL_TCP, TCP_CONGESTION, &dctcp, sizeof(dctcp)))
if (bpf_setsockopt(ctx, SOL_TCP, TCP_CONGESTION, &reno, sizeof(reno)))
return 1;
if (verify_cc(ctx, dctcp))
if (verify_cc(ctx, reno))
return 1;

if (bpf_setsockopt(ctx, SOL_TCP, TCP_CONGESTION, &cubic, sizeof(cubic)))
Expand Down

0 comments on commit 57dc6f3

Please sign in to comment.