[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aErgYLGwLjoHxCLv@MacBook-Air.local>
Date: Thu, 12 Jun 2025 17:12:48 +0300
From: Joe Damato <joe@...a.to>
To: Breno Leitao <leitao@...ian.org>
Cc: Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com
Subject: Re: [PATCH net-next 1/2] netdevsim: migrate to dstats stats
collection
On Wed, Jun 11, 2025 at 08:06:19AM -0700, Breno Leitao wrote:
> Replace custom statistics tracking with the kernel's dstats infrastructure
> to simplify code and improve consistency with other network drivers.
>
> This change:
> - Sets dev->pcpu_stat_type = NETDEV_PCPU_STAT_DSTATS for automatic
> automatic allocation and deallocation.
Ignorable minor nits: "automatic" repeated twice in the list item above and the
other items in the list below do not end with periods.
> - Removes manual stats fields and their update
> - Replaces custom nsim_get_stats64() with dev_get_stats()
> - Uses dev_dstats_tx_add() and dev_dstats_tx_dropped() helpers
> - Eliminates the need for manual synchronization primitives
>
> The dstats framework provides the same functionality with less code.
>
> Suggested-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
> drivers/net/netdevsim/netdev.c | 33 ++++++---------------------------
> drivers/net/netdevsim/netdevsim.h | 5 -----
> 2 files changed, 6 insertions(+), 32 deletions(-)
Reviewed-by: Joe Damato <joe@...a.to>
Powered by blists - more mailing lists