mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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 <brakmo@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8c4b4c7e9f
commit
9872a4bde3
4 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue