diff options
| author | David S. Miller <davem@davemloft.net> | 2019-02-26 13:16:03 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-02-26 13:16:03 -0800 |
| commit | 7b2464d976c1608460f41273dbc54ec3629c2431 (patch) | |
| tree | 9528169c06616cc56d61f07767e4746ea1a00535 /include | |
| parent | a110ae7096c9f564d15b0e56a8bba79ffeaaa618 (diff) | |
| parent | 564833419f1216c36d28a142b3c8119fd49104d7 (diff) | |
Merge branch 'tcp-cleanups'
Eric Dumazet says:
====================
tcp: cleanups for linux-5.1
This small patch series cleanups few things, and add a small
timewait optimization for hosts not using md5.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/tcp.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index a6e0355921e1..68ee02523b87 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1558,7 +1558,7 @@ struct tcp_md5sig_key *tcp_v4_md5_lookup(const struct sock *sk, #ifdef CONFIG_TCP_MD5SIG #include <linux/jump_label.h> -extern struct static_key tcp_md5_needed; +extern struct static_key_false tcp_md5_needed; struct tcp_md5sig_key *__tcp_md5_do_lookup(const struct sock *sk, const union tcp_md5_addr *addr, int family); @@ -1567,7 +1567,7 @@ tcp_md5_do_lookup(const struct sock *sk, const union tcp_md5_addr *addr, int family) { - if (!static_key_false(&tcp_md5_needed)) + if (!static_branch_unlikely(&tcp_md5_needed)) return NULL; return __tcp_md5_do_lookup(sk, addr, family); } @@ -1716,20 +1716,9 @@ static inline bool tcp_rtx_and_write_queues_empty(const struct sock *sk) return tcp_rtx_queue_empty(sk) && tcp_write_queue_empty(sk); } -static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked) -{ - if (tcp_write_queue_empty(sk)) - tcp_chrono_stop(sk, TCP_CHRONO_BUSY); -} - -static inline void __tcp_add_write_queue_tail(struct sock *sk, struct sk_buff *skb) -{ - __skb_queue_tail(&sk->sk_write_queue, skb); -} - static inline void tcp_add_write_queue_tail(struct sock *sk, struct sk_buff *skb) { - __tcp_add_write_queue_tail(sk, skb); + __skb_queue_tail(&sk->sk_write_queue, skb); /* Queue it, remembering where we must start sending. */ if (sk->sk_write_queue.next == skb) |
