Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3662608pxu; Sun, 11 Oct 2020 19:17:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJKx5kYdV5AWFd2ub7SzByU6kHc+3Y5CxVVkY8oIDaa8ZggRmNlYdJO7Xk29NH9n7tdLJ5 X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr11567661edv.79.1602469047462; Sun, 11 Oct 2020 19:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602469047; cv=none; d=google.com; s=arc-20160816; b=r0YY5WWqzJLtDGwTA+x5athHXQC3Kt0nwqJ2jNXe+9jsKUlArviLEq0QMiZYAUfpiX 5J87nJKjU3V/vwkX2CrctdEAOT+dUnzeSaB/bHgHajIAU1ylZcEhAXIbVN54NKvnfTO8 Pp57pnT2d/bSqNqb73ARbLPfJJ7oro15kdNzNwb9WvG66Ca/89ISw3I5RV4iJ5hTwXhI 6lF3QdziwXrBsBXrrvNDyNQmN4JNkq55569LY9xPwb+/hMG9KchzFCgxE0fx2/aVlibn p/uKaXCchT4T/a3Kul6q802N89a6SFK9jT+lkwkjqD/+xSNfl0sVDKHkUt4Eygvk0xkm ZuuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=wMyNoFR/LtvDkiF318ZxE47qH/JycA1BezLOf3HcH/s=; b=l7H+tH9Lgnp0KcFOPVbRSoyS2z0veXkinib5SDvYPZBRMcCXlitzWRosCMcVWYlqO8 Fz2bF052kNdtmZ97uHXMwcPq19ePSsDWeSzjt23A9xlaD0RxihQMu6jHWbGxPwox4yIA AAqcd015V4ePD5las/LFkDGeaM5JrKc2SEG14GbzMqOU/QtorVRRWfyBjWEK8Xb2fM3i W6OuCjN3Ut4Es4v7cSl15P2ta4iEdFAoC3RKSXD8sZ8aKixtEC23tL/yJdN/ZGW1REjz PfR7mcZZms1SnL1h0hxoJg6XUb9lb6ZWjdbdxBvovbrcWEag/sQXCNOwXQ3UkAkiMKBC 3Hyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K7is528b; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm24si8011669ejb.683.2020.10.11.19.17.02; Sun, 11 Oct 2020 19:17:27 -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=@kernel.org header.s=default header.b=K7is528b; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387622AbgJKWH1 (ORCPT + 99 others); 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-wireless@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.