diff options
author | Eric Dumazet <edumazet@google.com> | 2019-02-26 12:49:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-26 16:16:03 -0500 |
commit | 921f9a0f2e8c326bfcdde7a59be0bac801a3d588 (patch) | |
tree | 590ede430a2a25ca46c5e171b4f74a6c203fbc6f /net/ipv4/tcp_output.c | |
parent | a43e052beacb2c0cecd0e807590b70fc4ff99dba (diff) |
tcp: convert tcp_md5_needed to static_branch API
We prefer static_branch_unlikely() over static_key_false() these days.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index e72aa0ff5785..91f5cc5a3f88 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -597,7 +597,7 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb, | |||
597 | 597 | ||
598 | *md5 = NULL; | 598 | *md5 = NULL; |
599 | #ifdef CONFIG_TCP_MD5SIG | 599 | #ifdef CONFIG_TCP_MD5SIG |
600 | if (static_key_false(&tcp_md5_needed) && | 600 | if (static_branch_unlikely(&tcp_md5_needed) && |
601 | rcu_access_pointer(tp->md5sig_info)) { | 601 | rcu_access_pointer(tp->md5sig_info)) { |
602 | *md5 = tp->af_specific->md5_lookup(sk, sk); | 602 | *md5 = tp->af_specific->md5_lookup(sk, sk); |
603 | if (*md5) { | 603 | if (*md5) { |
@@ -734,7 +734,7 @@ static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb | |||
734 | 734 | ||
735 | *md5 = NULL; | 735 | *md5 = NULL; |
736 | #ifdef CONFIG_TCP_MD5SIG | 736 | #ifdef CONFIG_TCP_MD5SIG |
737 | if (static_key_false(&tcp_md5_needed) && | 737 | if (static_branch_unlikely(&tcp_md5_needed) && |
738 | rcu_access_pointer(tp->md5sig_info)) { | 738 | rcu_access_pointer(tp->md5sig_info)) { |
739 | *md5 = tp->af_specific->md5_lookup(sk, sk); | 739 | *md5 = tp->af_specific->md5_lookup(sk, sk); |
740 | if (*md5) { | 740 | if (*md5) { |