bpf: Support passing args to sock_ops bpf function
Adds support for passing up to 4 arguments to sock_ops bpf functions. It reusues the reply union, so the bpf_sock_ops structures are not increased in size. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:

committed by
Alexei Starovoitov

parent
b73042b8a2
commit
de525be2ca
@@ -146,7 +146,7 @@ static void tcpnv_init(struct sock *sk)
|
||||
* within a datacenter, where we have reasonable estimates of
|
||||
* RTTs
|
||||
*/
|
||||
base_rtt = tcp_call_bpf(sk, BPF_SOCK_OPS_BASE_RTT);
|
||||
base_rtt = tcp_call_bpf(sk, BPF_SOCK_OPS_BASE_RTT, 0, NULL);
|
||||
if (base_rtt > 0) {
|
||||
ca->nv_base_rtt = base_rtt;
|
||||
ca->nv_lower_bound_rtt = (base_rtt * 205) >> 8; /* 80% */
|
||||
|
Reference in New Issue
Block a user