mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
ipv6: icmp: use this_cpu_read() in icmpv6_sk()
In general, this_cpu_read(*X) is faster than *this_cpu_ptr(X) Also remove the inline attibute, totally useless. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fa85999f49
commit
2789c14d19
1 changed files with 2 additions and 2 deletions
|
@ -79,9 +79,9 @@
|
||||||
*
|
*
|
||||||
* On SMP we have one ICMP socket per-cpu.
|
* On SMP we have one ICMP socket per-cpu.
|
||||||
*/
|
*/
|
||||||
static inline struct sock *icmpv6_sk(struct net *net)
|
static struct sock *icmpv6_sk(struct net *net)
|
||||||
{
|
{
|
||||||
return *this_cpu_ptr(net->ipv6.icmp_sk);
|
return this_cpu_read(*net->ipv6.icmp_sk);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
static int icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||||
|
|
Loading…
Add table
Reference in a new issue