diff options
author | Lawrence Brakmo <brakmo@fb.com> | 2017-06-30 23:02:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-01 19:15:14 -0400 |
commit | 91b5b21c7c16899abb37f4a9e4388b4e9aae0b9d (patch) | |
tree | ff5989374783d9f11e822906a98e94d08a6f135a /net/ipv4/tcp_input.c | |
parent | d9925368a641391f38cd281e67b948e6b6f3bcca (diff) |
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, | |||
6191 | ecn_ok = net->ipv4.sysctl_tcp_ecn || ecn_ok_dst; | 6191 | ecn_ok = net->ipv4.sysctl_tcp_ecn || ecn_ok_dst; |
6192 | 6192 | ||
6193 | if ((!ect && ecn_ok) || tcp_ca_needs_ecn(listen_sk) || | 6193 | if ((!ect && ecn_ok) || tcp_ca_needs_ecn(listen_sk) || |
6194 | (ecn_ok_dst & DST_FEATURE_ECN_CA)) | 6194 | (ecn_ok_dst & DST_FEATURE_ECN_CA) || |
6195 | tcp_bpf_ca_needs_ecn((struct sock *)req)) | ||
6195 | inet_rsk(req)->ecn_ok = 1; | 6196 | inet_rsk(req)->ecn_ok = 1; |
6196 | } | 6197 | } |
6197 | 6198 | ||