[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240608133723.GH27689@kernel.org>
Date: Sat, 8 Jun 2024 14:37:23 +0100
From: Simon Horman <horms@...nel.org>
To: Jeremy Kerr <jk@...econstruct.com.au>
Cc: David Ahern <dsahern@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/3] net: core: Implement dstats-type stats
collections
On Fri, Jun 07, 2024 at 06:25:25PM +0800, Jeremy Kerr wrote:
> We currently have dev_get_tstats64() for collecting per-cpu stats of
> type pcpu_sw_netstats ("tstats"). However, tstats doesn't allow for
> accounting tx/rx drops. We do have a stats variant that does have stats
> for dropped packets: struct pcpu_dstats, but there are no core helpers
> for using those stats.
>
> The VRF driver uses dstats, by providing its own collation/fetch
> functions to do so.
>
> This change adds a common implementation for dstats-type collection,
> used when pcpu_stat_type == NETDEV_PCPU_STAT_DSTAT. This is based on the
> VRF driver's existing stats collator (plus the unused tx_drops stat from
> there). We will switch the VRF driver to use this in the next change.
>
> Signed-off-by: Jeremy Kerr <jk@...econstruct.com.au>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists