Heiner Kallweit writes:
> Simplify the code by using new function dev_fetch_sw_netstats().
>
> Signed-off-by: Heiner Kallweit
Acked-by: Bjørn Mork
On 10/11/2020 12:41 PM, Heiner Kallweit wrote:
Simplify the code by using new function dev_fetch_sw_netstats().
Signed-off-by: Heiner Kallweit
Reviewed-by: Florian Fainelli
--
Florian
On Mon, 12 Oct 2020 00:29:52 +0200 Heiner Kallweit wrote:
> On 12.10.2020 00:10, Jakub Kicinski wrote:
> > On Sun, 11 Oct 2020 21:34:58 +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 fa
On Sun, 11 Oct 2020 21:34:58 +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().
FWIW probably fine to convert nfp_repr_get_host_st
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
> +/**
> + *
On Sun, 11 Oct 2020 21:36:43 +0200
Heiner Kallweit wrote:
> +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s,
> +struct pcpu_sw_netstats __percpu *netstats)
netstats is unmodified, should it be const?
> +{
> + int cpu;
> +
> + if (IS_ERR_OR_NULL(netstats))
On Sun, Oct 11, 2020 at 09:41:27PM +0200, Heiner Kallweit wrote:
> Simplify the code by using new function dev_fetch_sw_netstats().
>
> Signed-off-by: Heiner Kallweit
> ---
Tested-by: Vladimir Oltean