From patchwork Mon Oct 5 20:36:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 288969 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 247B8C4363A for ; Mon, 5 Oct 2020 20:37:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE06E204EA for ; Mon, 5 Oct 2020 20:37:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729341AbgJEUhO (ORCPT ); Mon, 5 Oct 2020 16:37:14 -0400 Received: from mailrelay115.isp.belgacom.be ([195.238.20.142]:49542 "EHLO mailrelay115.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729231AbgJEUhI (ORCPT ); Mon, 5 Oct 2020 16:37:08 -0400 IronPort-SDR: xfM8e/s1NvphrdxcbvW6sCe8mwA2VxAVB2FptAZCmpWkWCXmm9cEOK64z/Fqccf/7JTBwzxAfp +CAkOZ2wflT2+WExnAGHPkLK2LZ5KDc95IUQRvPoSh1zzcoEeTUKY+/b7pSeVEfQXEVwkj1NFx B8AS0xNzsCnzSqa4k43iafdxfOsda1AG2lYRtmUsuNwm/FQkEdnA1ctvPJSFGPbvD9RwauvAuY UNdwH2YgL0dsdSICRhUP8eNsUo2EbbS+hLJiikRPMiun68jM484x6+yPVI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2mUUbfaa32Zsbcne4Hu5pI0+Be3rjns8BEXsWvgo5VOHqjkONUSJOaHmsQaIx/S87CI24AofZXIytg6KO3D29HpJIYmBKEFeMEW3nd4+cQfcDdDqSItN9kjwDTbWhUJMh2g+gtA/01bVnKPDY+i4ctZ35z9h1/PPclQsu9TFvFMSSzX2CT3xynmwWWz86xrxwoUt4yl2by6h3n+RYFcBP5/NOSgo6NYDTz/ZhBN/sQALBYsyESFmhQtWgHD4xScgxz8UUbEZlAdqiiArM0zCtA78PmLyHHoY78r/E1XjrO8l902rG1LUmj1Q+TMtAL3aphqBk+gjIBI7Ik0OZmLi2dagGxyHC6jTL8W3bsEhGXQtYXazbUHUbYUXK69L0+geKTKKkAJwkPxFHxMrELbFFLpXvgElKSenLJtvTeSSyln22CBLOwamDP6TwfGBI8izXCUEC2y4J8HqLLwk1BW/1rWvUAhR1FkPpbl+q++Qo+yDzdVM90wzfNx4p7LGy4BNA3fE= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DgAgDggntf/xCltltgHAEBAQEBAQcBARIBAQQEAQFHgUiBHoJRX40/klaKWYctCwEBAQEBAQEBATUBAgQBAYRKgjsmOBMCAwEBAQMCBQEBBgEBAQEBAQUEAYYPRYI3IoNHCwEjI4E/EoMmglgpqhczhBCBRINHgUKBOIgyhRqBQT+EX4o0BLdNgnGDE4RrklQPIqEfLZJnoimBek0gGIMkUBkNjisXjiZCMDcCBgoBAQMJVwE9AY0yAQE X-IPAS-Result: A2DgAgDggntf/xCltltgHAEBAQEBAQcBARIBAQQEAQFHgUiBHoJRX40/klaKWYctCwEBAQEBAQEBATUBAgQBAYRKgjsmOBMCAwEBAQMCBQEBBgEBAQEBAQUEAYYPRYI3IoNHCwEjI4E/EoMmglgpqhczhBCBRINHgUKBOIgyhRqBQT+EX4o0BLdNgnGDE4RrklQPIqEfLZJnoimBek0gGIMkUBkNjisXjiZCMDcCBgoBAQMJVwE9AY0yAQE Received: from 16.165-182-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.182.165.16]) by relay.skynet.be with ESMTP; 05 Oct 2020 22:37:06 +0200 From: Fabian Frederick To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au, Fabian Frederick Subject: [PATCH 7/9 net-next] xfrm: use dev_sw_netstats_rx_add() Date: Mon, 5 Oct 2020 22:36:34 +0200 Message-Id: <20201005203634.55435-1-fabf@skynet.be> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org use new helper for netstats settings Signed-off-by: Fabian Frederick Acked-by: Herbert Xu --- net/xfrm/xfrm_interface.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index eb8181987620d..8f8631eafe784 100644 --- a/net/xfrm/xfrm_interface.c +++ b/net/xfrm/xfrm_interface.c @@ -210,7 +210,6 @@ static void xfrmi_scrub_packet(struct sk_buff *skb, bool xnet) static int xfrmi_rcv_cb(struct sk_buff *skb, int err) { const struct xfrm_mode *inner_mode; - struct pcpu_sw_netstats *tstats; struct net_device *dev; struct xfrm_state *x; struct xfrm_if *xi; @@ -255,13 +254,7 @@ static int xfrmi_rcv_cb(struct sk_buff *skb, int err) } xfrmi_scrub_packet(skb, xnet); - - tstats = this_cpu_ptr(dev->tstats); - - u64_stats_update_begin(&tstats->syncp); - tstats->rx_packets++; - tstats->rx_bytes += skb->len; - u64_stats_update_end(&tstats->syncp); + dev_sw_netstats_rx_add(dev, skb->len); return 0; }