summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 21:39:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-06 21:39:49 -0400
commit1c8c5a9d38f607c0b6fd12c91cbe1a4418762a21 (patch)
treedcc97181d4d187252e0cc8fdf29d9b365fa3ffd0 /include/net/tcp.h
parent285767604576148fc1be7fcd112e4a90eb0d6ad2 (diff)
parent7170e6045a6a8b33f4fa5753589dc77b16198e2d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) Add Maglev hashing scheduler to IPVS, from Inju Song. 2) Lots of new TC subsystem tests from Roman Mashak. 3) Add TCP zero copy receive and fix delayed acks and autotuning with SO_RCVLOWAT, from Eric Dumazet. 4) Add XDP_REDIRECT support to mlx5 driver, from Jesper Dangaard Brouer. 5) Add ttl inherit support to vxlan, from Hangbin Liu. 6) Properly separate ipv6 routes into their logically independant components. fib6_info for the routing table, and fib6_nh for sets of nexthops, which thus can be shared. From David Ahern. 7) Add bpf_xdp_adjust_tail helper, which can be used to generate ICMP messages from XDP programs. From Nikita V. Shirokov. 8) Lots of long overdue cleanups to the r8169 driver, from Heiner Kallweit. 9) Add BTF ("BPF Type Format"), from Martin KaFai Lau. 10) Add traffic condition monitoring to iwlwifi, from Luca Coelho. 11) Plumb extack down into fib_rules, from Roopa Prabhu. 12) Add Flower classifier offload support to igb, from Vinicius Costa Gomes. 13) Add UDP GSO support, from Willem de Bruijn. 14) Add documentation for eBPF helpers, from Quentin Monnet. 15) Add TLS tx offload to mlx5, from Ilya Lesokhin. 16) Allow applications to be given the number of bytes available to read on a socket via a control message returned from recvmsg(), from Soheil Hassas Yeganeh. 17) Add x86_32 eBPF JIT compiler, from Wang YanQing. 18) Add AF_XDP sockets, with zerocopy support infrastructure as well. From Björn Töpel. 19) Remove indirect load support from all of the BPF JITs and handle these operations in the verifier by translating them into native BPF instead. From Daniel Borkmann. 20) Add GRO support to ipv6 gre tunnels, from Eran Ben Elisha. 21) Allow XDP programs to do lookups in the main kernel routing tables for forwarding. From David Ahern. 22) Allow drivers to store hardware state into an ELF section of kernel dump vmcore files, and use it in cxgb4. From Rahul Lakkireddy. 23) Various RACK and loss detection improvements in TCP, from Yuchung Cheng. 24) Add TCP SACK compression, from Eric Dumazet. 25) Add User Mode Helper support and basic bpfilter infrastructure, from Alexei Starovoitov. 26) Support ports and protocol values in RTM_GETROUTE, from Roopa Prabhu. 27) Support bulking in ->ndo_xdp_xmit() API, from Jesper Dangaard Brouer. 28) Add lots of forwarding selftests, from Petr Machata. 29) Add generic network device failover driver, from Sridhar Samudrala. * ra.kernel.org:/pub/scm/linux/kernel/git/davem/net-next: (1959 commits) strparser: Add __strp_unpause and use it in ktls. rxrpc: Fix terminal retransmission connection ID to include the channel net: hns3: Optimize PF CMDQ interrupt switching process net: hns3: Fix for VF mailbox receiving unknown message net: hns3: Fix for VF mailbox cannot receiving PF response bnx2x: use the right constant Revert "net: sched: cls: Fix offloading when ingress dev is vxlan" net: dsa: b53: Fix for brcm tag issue in Cygnus SoC enic: fix UDP rss bits netdev-FAQ: clarify DaveM's position for stable backports rtnetlink: validate attributes in do_setlink() mlxsw: Add extack messages for port_{un, }split failures netdevsim: Add extack error message for devlink reload devlink: Add extack to reload and port_{un, }split operations net: metrics: add proper netlink validation ipmr: fix error path when ipmr_new_table fails ip6mr: only set ip6mr_table from setsockopt when ip6mr_new_table succeeds net: hns3: remove unused hclgevf_cfg_func_mta_filter netfilter: provide udp*_lib_lookup for nf_tproxy qed*: Utilize FW 8.37.2.0 ...
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index f88f8a2cab0d..0448e7c5d2b4 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -245,6 +245,7 @@ extern long sysctl_tcp_mem[3];
245 245
246#define TCP_RACK_LOSS_DETECTION 0x1 /* Use RACK to detect losses */ 246#define TCP_RACK_LOSS_DETECTION 0x1 /* Use RACK to detect losses */
247#define TCP_RACK_STATIC_REO_WND 0x2 /* Use static RACK reo wnd */ 247#define TCP_RACK_STATIC_REO_WND 0x2 /* Use static RACK reo wnd */
248#define TCP_RACK_NO_DUPTHRESH 0x4 /* Do not use DUPACK threshold in RACK */
248 249
249extern atomic_long_t tcp_memory_allocated; 250extern atomic_long_t tcp_memory_allocated;
250extern struct percpu_counter tcp_sockets_allocated; 251extern struct percpu_counter tcp_sockets_allocated;
@@ -333,8 +334,7 @@ void tcp_write_timer_handler(struct sock *sk);
333void tcp_delack_timer_handler(struct sock *sk); 334void tcp_delack_timer_handler(struct sock *sk);
334int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg); 335int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
335int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb); 336int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb);
336void tcp_rcv_established(struct sock *sk, struct sk_buff *skb, 337void tcp_rcv_established(struct sock *sk, struct sk_buff *skb);
337 const struct tcphdr *th);
338void tcp_rcv_space_adjust(struct sock *sk); 338void tcp_rcv_space_adjust(struct sock *sk);
339int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp); 339int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);
340void tcp_twsk_destructor(struct sock *sk); 340void tcp_twsk_destructor(struct sock *sk);
@@ -401,6 +401,10 @@ void tcp_set_keepalive(struct sock *sk, int val);
401void tcp_syn_ack_timeout(const struct request_sock *req); 401void tcp_syn_ack_timeout(const struct request_sock *req);
402int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock, 402int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
403 int flags, int *addr_len); 403 int flags, int *addr_len);
404int tcp_set_rcvlowat(struct sock *sk, int val);
405void tcp_data_ready(struct sock *sk);
406int tcp_mmap(struct file *file, struct socket *sock,
407 struct vm_area_struct *vma);
404void tcp_parse_options(const struct net *net, const struct sk_buff *skb, 408void tcp_parse_options(const struct net *net, const struct sk_buff *skb,
405 struct tcp_options_received *opt_rx, 409 struct tcp_options_received *opt_rx,
406 int estab, struct tcp_fastopen_cookie *foc); 410 int estab, struct tcp_fastopen_cookie *foc);
@@ -552,7 +556,12 @@ void tcp_fin(struct sock *sk);
552void tcp_init_xmit_timers(struct sock *); 556void tcp_init_xmit_timers(struct sock *);
553static inline void tcp_clear_xmit_timers(struct sock *sk) 557static inline void tcp_clear_xmit_timers(struct sock *sk)
554{ 558{
555 hrtimer_cancel(&tcp_sk(sk)->pacing_timer); 559 if (hrtimer_try_to_cancel(&tcp_sk(sk)->pacing_timer) == 1)
560 __sock_put(sk);
561
562 if (hrtimer_try_to_cancel(&tcp_sk(sk)->compressed_ack_timer) == 1)
563 __sock_put(sk);
564
556 inet_csk_clear_xmit_timers(sk); 565 inet_csk_clear_xmit_timers(sk);
557} 566}
558 567
@@ -809,9 +818,8 @@ struct tcp_skb_cb {
809#endif 818#endif
810 } header; /* For incoming skbs */ 819 } header; /* For incoming skbs */
811 struct { 820 struct {
812 __u32 key;
813 __u32 flags; 821 __u32 flags;
814 struct bpf_map *map; 822 struct sock *sk_redir;
815 void *data_end; 823 void *data_end;
816 } bpf; 824 } bpf;
817 }; 825 };
@@ -1865,6 +1873,10 @@ void tcp_v4_init(void);
1865void tcp_init(void); 1873void tcp_init(void);
1866 1874
1867/* tcp_recovery.c */ 1875/* tcp_recovery.c */
1876void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb);
1877void tcp_newreno_mark_lost(struct sock *sk, bool snd_una_advanced);
1878extern s32 tcp_rack_skb_timeout(struct tcp_sock *tp, struct sk_buff *skb,
1879 u32 reo_wnd);
1868extern void tcp_rack_mark_lost(struct sock *sk); 1880extern void tcp_rack_mark_lost(struct sock *sk);
1869extern void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq, 1881extern void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
1870 u64 xmit_time); 1882 u64 xmit_time);
@@ -2095,4 +2107,12 @@ static inline bool tcp_bpf_ca_needs_ecn(struct sock *sk)
2095#if IS_ENABLED(CONFIG_SMC) 2107#if IS_ENABLED(CONFIG_SMC)
2096extern struct static_key_false tcp_have_smc; 2108extern struct static_key_false tcp_have_smc;
2097#endif 2109#endif
2110
2111#if IS_ENABLED(CONFIG_TLS_DEVICE)
2112void clean_acked_data_enable(struct inet_connection_sock *icsk,
2113 void (*cad)(struct sock *sk, u32 ack_seq));
2114void clean_acked_data_disable(struct inet_connection_sock *icsk);
2115
2116#endif
2117
2098#endif /* _TCP_H */ 2118#endif /* _TCP_H */