diff options
| author | Lawrence Brakmo <[email protected]> | 2017-07-01 03:02:47 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-07-01 23:15:14 +0000 |
| commit | 9872a4bde31b0b055448e9ac1f4c9ee62d978766 (patch) | |
| tree | d335c073d98d9a96983b1e0b5a341957c8dc982d /net/ipv4/tcp_fastopen.c | |
| parent | bpf: Add setsockopt helper function to bpf (diff) | |
| download | kernel-9872a4bde31b0b055448e9ac1f4c9ee62d978766.tar.gz kernel-9872a4bde31b0b055448e9ac1f4c9ee62d978766.zip | |
bpf: Add TCP connection BPF callbacks
Added callbacks to BPF SOCK_OPS type program before an active
connection is intialized and after a passive or active connection is
established.
The following patch demostrates how they can be used to set send and
receive buffer sizes.
Signed-off-by: Lawrence Brakmo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_fastopen.c')
| -rw-r--r-- | net/ipv4/tcp_fastopen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c index 8b1539efaf38..ce9c7fef200f 100644 --- a/net/ipv4/tcp_fastopen.c +++ b/net/ipv4/tcp_fastopen.c @@ -221,6 +221,7 @@ static struct sock *tcp_fastopen_create_child(struct sock *sk, tcp_init_congestion_control(child); tcp_mtup_init(child); tcp_init_metrics(child); + tcp_call_bpf(child, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB); tcp_init_buffer_space(child); tp->rcv_nxt = TCP_SKB_CB(skb)->seq + 1; |
