diff options
author | 2017-06-30 20:02:49 -0700 | |
---|---|---|
committer | 2017-07-01 16:15:14 -0700 | |
commit | 91b5b21c7c16899abb37f4a9e4388b4e9aae0b9d (patch) | |
tree | ff5989374783d9f11e822906a98e94d08a6f135a /net/ipv4/tcp_input.c | |
parent | bpf: Sample BPF program to set buffer sizes (diff) | |
download | linux-91b5b21c7c16899abb37f4a9e4388b4e9aae0b9d.tar.gz linux-91b5b21c7c16899abb37f4a9e4388b4e9aae0b9d.tar.bz2 linux-91b5b21c7c16899abb37f4a9e4388b4e9aae0b9d.zip |
bpf: Add support for changing congestion control
Added support for changing congestion control for SOCK_OPS bpf
programs through the setsockopt bpf helper function. It also adds
a new SOCK_OPS op, BPF_SOCK_OPS_NEEDS_ECN, that is needed for
congestion controls, like dctcp, that need to enable ECN in the
SYN packets.
Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 664210e5e4a7..2920e0cb09f8 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -6191,7 +6191,8 @@ static void tcp_ecn_create_request(struct request_sock *req, ecn_ok = net->ipv4.sysctl_tcp_ecn || ecn_ok_dst; if ((!ect && ecn_ok) || tcp_ca_needs_ecn(listen_sk) || - (ecn_ok_dst & DST_FEATURE_ECN_CA)) + (ecn_ok_dst & DST_FEATURE_ECN_CA) || + tcp_bpf_ca_needs_ecn((struct sock *)req)) inet_rsk(req)->ecn_ok = 1; } |