diff options
author | Eric Dumazet <edumazet@google.com> | 2019-06-01 04:17:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-04 00:09:34 +0200 |
commit | 5472c3c6a5f0573a609f77adce8ed1bd54233c7a (patch) | |
tree | aec86becfb120b7fee84bdaa37c0861ccc6933f4 /net/ipv4 | |
parent | ipv4: icmp: use this_cpu_read() in icmp_sk() (diff) | |
download | linux-5472c3c6a5f0573a609f77adce8ed1bd54233c7a.tar.xz linux-5472c3c6a5f0573a609f77adce8ed1bd54233c7a.zip |
tcp: use this_cpu_read(*X) instead of *this_cpu_ptr(X)
this_cpu_read(*X) is slightly faster than *this_cpu_ptr(X)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index af81e4a6a8d8..59b7edd8719c 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -771,7 +771,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb) arg.tos = ip_hdr(skb)->tos; arg.uid = sock_net_uid(net, sk && sk_fullsock(sk) ? sk : NULL); local_bh_disable(); - ctl_sk = *this_cpu_ptr(net->ipv4.tcp_sk); + ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); if (sk) ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? inet_twsk(sk)->tw_mark : sk->sk_mark; @@ -863,7 +863,7 @@ static void tcp_v4_send_ack(const struct sock *sk, arg.tos = tos; arg.uid = sock_net_uid(net, sk_fullsock(sk) ? sk : NULL); local_bh_disable(); - ctl_sk = *this_cpu_ptr(net->ipv4.tcp_sk); + ctl_sk = this_cpu_read(*net->ipv4.tcp_sk); if (sk) ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? inet_twsk(sk)->tw_mark : sk->sk_mark; |