Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_MED,URIBL_BLOCKED, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82731C04AB6 for ; Fri, 31 May 2019 22:27:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4140C26FA3 for ; Fri, 31 May 2019 22:27:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="f38RwaIg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726697AbfEaW1F (ORCPT ); Fri, 31 May 2019 18:27:05 -0400 Received: from mail-qk1-f201.google.com ([209.85.222.201]:46068 "EHLO mail-qk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbfEaW1F (ORCPT ); Fri, 31 May 2019 18:27:05 -0400 Received: by mail-qk1-f201.google.com with SMTP id u129so9154425qkd.12 for ; Fri, 31 May 2019 15:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=q966+WsM0aWKcMLMoESqg9HP4rfdJz0al/h98xW2Jkw=; b=f38RwaIge8wWaGhhSZPEjEYpisJ+qsel6GfpH8SJHQhdPAFL5NJLxg3HO2dYijUYlH poYpEmxrxlOexNrJ57LMMP+wbk3lsilbSvCgC8+yr0BCUZU7EdCyXIi0t8FUhwVq9OLO Mwch8npshmXYEZw60R+7LOXsURToMVofxS19zt1YAhMn3Oth2F+q8YXFn3/eq8/Vy8jB kjJj2gpXGVx7xW9Ws77HrCZ3f82/JTqME56WosJfOEGisAwKAsTVrfmK2E+IY16FWU2f n0/xd0MScn08GdSfnGt5IYGPIGnuvPwlG5Eh8+k1h/x0uUJtVx/A3mwnKisUVWnUCXlR yIqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=q966+WsM0aWKcMLMoESqg9HP4rfdJz0al/h98xW2Jkw=; b=osF56GUPOsg3EbPHBSANBwpJuMAfNypnhomG//HQSBfZYGM6dmgwLt7vB8YZFIl2Gq DfKhLZGPdODeFdfZ0D8jiqysFOg++dkFI4fPdKCfl9NUZOotKBJLc9c+rgNJ2+lGskbc R90At8CZ90I3sslD6CNj6Mef5RIGNXw7zOeDzvTz82ZX8MKpza4CXd3lWNl1cvBHOn9R L8kqasC7tia3cr1yleXVNpfnliWILHfKef0KQSxLL4SKuyrlDHHO4divYGZLqsxy7zKv vJojK+QYfCcEg+hEw7IPhxKFk2WH4BI11pxe0yVi55N9T5a4cS3nseX9KjEa0h75pjb0 7VOQ== X-Gm-Message-State: APjAAAUeGnk+HEMCRUL76mlYs0p7j8JoOJoFe7OK3ZW0JtRI+ctAt7/W mydKlqV2VZH7A6BMmKvqydYquRw+3Sxpzw== X-Google-Smtp-Source: APXvYqwi3axQ7/78LaRzHmShU/ev46Btq0RC9Kx6orEtrpxDO1phsqnpop2ojHF7/8FjtJ0j57zfsXhEnxoFow== X-Received: by 2002:a05:620a:16c1:: with SMTP id a1mr10768037qkn.269.1559341624121; Fri, 31 May 2019 15:27:04 -0700 (PDT) Date: Fri, 31 May 2019 15:27:00 -0700 Message-Id: <20190531222700.252607-1-edumazet@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.rc1.257.g3120a18244-goog Subject: [PATCH net-next] ipv6: icmp: use this_cpu_read() in icmpv6_sk() From: Eric Dumazet To: "David S . Miller" Cc: netdev , Eric Dumazet , Eric Dumazet , Kefeng Wang Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Cc: Kefeng Wang --- net/ipv6/icmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index afb915807cd0109e02df6e0858319c0ff78c33e8..d274f5b64afe0c5325d6f14c33842b7da61653e8 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -79,9 +79,9 @@ * * 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, -- 2.22.0.rc1.257.g3120a18244-goog