Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3804980pxu; Mon, 12 Oct 2020 01:18:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhK7t0CugeCHTxEte4i9zZY21Y4oCUQbBoecUKQ1XaH/chPaMC0lHPmN0IADVcFJJgv7kf X-Received: by 2002:a17:907:4301:: with SMTP id nh1mr25383986ejb.397.1602490719521; Mon, 12 Oct 2020 01:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602490719; cv=none; d=google.com; s=arc-20160816; b=UcvVRpGGLcskuuyezCIjmlB3hogpq3ad/DaqIkbc9n2D6dB/IGuBGCRpRDTRCENCBl cYw2aL2i4WHarekxaRA4njBi5MSAYdv6eiDZTSpbEr1l/8XNnTme/7C/oUtVny2gb9b5 dS2pQdWV/J8DbiO70AgFZYtW4HFOpq9s6q65h3/Rj0oAnRjTIs1xXV+cz9omh0NUa0vq 0WfaOb4scFvDvfA9LSCIal+jFya6FzwQu89CGrRHd52pShZzBdvc4uzItlqioRm5pi7g ywKr4yu588iMZpoDVe7ybdHGgS3MeYpWO8XvDdO0J7Q54ScIHD8qDkWXsYZ84bqZvNPd JY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:cc:to:subject:from :dkim-signature; bh=E6ZQVUiO2275Bcug8uUrW3WsykSr+byogH0GbMVRigw=; b=AVc/DbplyLCv3UvXqm18ZGAOxret/xdcIzv2oCXzedPvSCeCtiZpeH7jxOaMYySMfT HaUutcCPGKeFkIEUMor6kUVHdnTfprGyvBaaXrAEd+X4LW+gi0Af0dhR/HWha6Tj/8+s sjzI1/LR0zTynLxFKsgNiRINcYY+2zALl2Rh19TF/HcaiHZRvDOohCpiLFhx+YpRq/vP BGkHcDuXCA3YpSGu2OwvIcBblxnOOdW82r4KYBV4bLtVwdur4z0F7WkEW9acKN3p9ywi IqPIPHW46ykMXA70Lp8j3L/m/JoZEm6kg8wdaNGMoSAgPHvR2cjqIaXAVECH5jtQAuAm 5oGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GcDfopve; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si11706021eja.475.2020.10.12.01.18.03; Mon, 12 Oct 2020 01:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GcDfopve; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727452AbgJLIAY (ORCPT + 99 others); Mon, 12 Oct 2020 04:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbgJLIAX (ORCPT ); Mon, 12 Oct 2020 04:00:23 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 426C2C0613CE; Mon, 12 Oct 2020 01:00:23 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id u8so21932924ejg.1; Mon, 12 Oct 2020 01:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=E6ZQVUiO2275Bcug8uUrW3WsykSr+byogH0GbMVRigw=; b=GcDfopve+WPhIRwCJrdYk1/TfRko9i65Ilpv8HZL+ED4dQxCulnQnRZePaC64NPAr2 nmn49sDr6c5oTxnoaD2uTYlCVwQO8ZXYpcby1pF1D2C+klxUKxBdYIrvBNyVr+GmiuG8 2bxGIzY8Kxom/n/9bHVET77PZ+zY76sAt0wT5b3JoLdHxzTW8+7RWqIDuoC4DkIKWI6m 7HiNZNlq7bhlUSEqBASqo+IrjOTSLh2e3kzN+VzkPV5G32LDlCJJtFw4Om97uHa2w1yJ VkNWhQdsIVRQDbB1ucSjpnk/Fp3cj2MWiyRP9+YPlG7kqDkXi/dXv8baEtjIGqojK2hg 0+vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=E6ZQVUiO2275Bcug8uUrW3WsykSr+byogH0GbMVRigw=; b=BeQOuwcxpOp1wFrB1Y2rJvnyX28ggCNQYAG5l8eVgAlbDVWNvU7zCHBoF1H7/MBd7b vt02e8acz3yYPMB4BZAdKM7ZO+54/DD/fSenqd6S2QAih+qjqSLVdbLCDl1Je9AKwG9+ sfUkjWY/CjjCtMxY8tV8YjpjXJdjFdJfELWe0P5WSYaDHFyMMdqK/VvGPxpFJtDruQm3 eLBBjclouDP+j4cyysP5n4Pw92dZICylVm7VPYMaNft6o9FjnNHJhlBSwrxexAqru7b/ VkBTQKqv/KzQoUjcrNCH5ld/z1//wGiBshquPBGA7add1obPFHuA1tCiWt9eZmAQZc1E +7JQ== X-Gm-Message-State: AOAM533ZbgJvreW0Re0hlzBR+yMfoStaIDqss6z6fEP613SYAAG63yw6 WfQj9QMuyeRR4Kg9R9uQS8U= X-Received: by 2002:a17:907:4365:: with SMTP id nd5mr27607240ejb.56.1602489621917; Mon, 12 Oct 2020 01:00:21 -0700 (PDT) Received: from ?IPv6:2003:ea:8f00:6a00:f90c:2907:849f:701c? (p200300ea8f006a00f90c2907849f701c.dip0.t-ipconnect.de. [2003:ea:8f00:6a00:f90c:2907:849f:701c]) by smtp.googlemail.com with ESMTPSA id r21sm10129690eda.3.2020.10.12.01.00.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Oct 2020 01:00:21 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH net-next v2 00/12] net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats To: David Miller , Jakub Kicinski , =?UTF-8?Q?Bj=c3=b8rn_Mork?= , Oliver Neukum , Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Roopa Prabhu , Nikolay Aleksandrov , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Alexey Kuznetsov , Hideaki YOSHIFUJI , Johannes Berg , Pravin B Shelar , Steffen Klassert , Herbert Xu Cc: "netdev@vger.kernel.org" , linux-rdma@vger.kernel.org, Linux USB Mailing List , linux-wireless , bridge@lists.linux-foundation.org Message-ID: Date: Mon, 12 Oct 2020 10:00:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In several places the same code is used to populate rtnl_link_stats64 fields with data from pcpu_sw_netstats. Therefore factor out this code to a new function dev_fetch_sw_netstats(). v2: - constify argument netstats - don't ignore netstats being NULL or an ERRPTR - switch to EXPORT_SYMBOL_GPL Heiner Kallweit (12): net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats IB/hfi1: use new function dev_fetch_sw_netstats net: macsec: use new function dev_fetch_sw_netstats net: usb: qmi_wwan: use new function dev_fetch_sw_netstats net: usbnet: use new function dev_fetch_sw_netstats qtnfmac: use new function dev_fetch_sw_netstats net: bridge: use new function dev_fetch_sw_netstats net: dsa: use new function dev_fetch_sw_netstats iptunnel: use new function dev_fetch_sw_netstats mac80211: use new function dev_fetch_sw_netstats net: openvswitch: use new function dev_fetch_sw_netstats xfrm: use new function dev_fetch_sw_netstats drivers/infiniband/hw/hfi1/ipoib_main.c | 34 +------------------ drivers/net/macsec.c | 22 +----------- drivers/net/usb/qmi_wwan.c | 24 +------------ drivers/net/usb/usbnet.c | 24 +------------ drivers/net/wireless/quantenna/qtnfmac/core.c | 27 +-------------- include/linux/netdevice.h | 2 ++ net/bridge/br_device.c | 21 +----------- net/core/dev.c | 34 +++++++++++++++++++ net/dsa/slave.c | 21 +----------- net/ipv4/ip_tunnel_core.c | 23 +------------ net/mac80211/iface.c | 23 +------------ net/openvswitch/vport-internal_dev.c | 20 +---------- net/xfrm/xfrm_interface.c | 22 +----------- 13 files changed, 47 insertions(+), 250 deletions(-) -- 2.28.0