From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no 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 39EA5C433DF for ; Sun, 11 Oct 2020 22:07:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D328D20790 for ; Sun, 11 Oct 2020 22:07:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602454047; bh=cYxBbv7sf4+ShksP9pOzn23fOV8hhf0jD3Kignpjdwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=wFpoqBtTrU6wY7Fl4ehmZ/txL7BFkeGIDmajShBcpRvRrxu12Rduc7zK33dSz1SoL sEtrgLwvABvhnGNigkA57EsEelbKLc1fKOUc2dD1c9x6TTK3M/afegUuaTbGCAFBTV Npqa3+r5gIrsPOju3sNCFSDmknfE09B/piup6eJM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387616AbgJKWH1 (ORCPT ); Sun, 11 Oct 2020 18:07:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:45978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387413AbgJKWH1 (ORCPT ); Sun, 11 Oct 2020 18:07:27 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F3512078B; Sun, 11 Oct 2020 22:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602454046; bh=cYxBbv7sf4+ShksP9pOzn23fOV8hhf0jD3Kignpjdwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K7is528bYee8e4ispjMW+khAmwmEdHpzI2jR/3mqaBz8G17ewhikeY72h4FIm4VZq O2gcMiHHyPIGA7kAuGKj/jpwPK+4htkDZcK2pt1na8mUCg8551aJvYJdfhxHjjjiH/ ONqjZx4F2Em9kdJQAr5IXugBeWC6m2NTW2BSxdHI= Date: Sun, 11 Oct 2020 15:07:23 -0700 From: Jakub Kicinski To: Heiner Kallweit Cc: David Miller , =?UTF-8?B?QmrDuHJu?= 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 , "netdev@vger.kernel.org" , linux-rdma@vger.kernel.org, Linux USB Mailing List , linux-wireless , bridge@lists.linux-foundation.org Subject: Re: [PATCH net-next 01/12] net: core: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats Message-ID: <20201011150723.72dee9f8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <5bb71143-0dac-c413-7e97-50eed8a57862@gmail.com> References: <5bb71143-0dac-c413-7e97-50eed8a57862@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Sun, 11 Oct 2020 21:36:43 +0200 Heiner Kallweit wrote: > 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(). > > Signed-off-by: Heiner Kallweit > +/** > + * dev_fetch_sw_netstats - get per-cpu network device statistics > + * @s: place to store stats > + * @netstats: per-cpu network stats to read from > + * > + * Read per-cpu network statistics and populate the related fields in s. in @s? > + */ > +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, > + struct pcpu_sw_netstats __percpu *netstats) > +} > +EXPORT_SYMBOL(dev_fetch_sw_netstats); Your pick, but _GPL would be fine too even if most exports here are non-GPL-exclusive.