RE: [PATCH net-next v3 1/2] net: mana: Move hardware counter stats from per-port to per-VF context

Haiyang Zhang
2025-11-16T21:50:40Z

> -----Original Message-----
> From: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
> Sent: Friday, November 14, 2025 6:43 AM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; wei.liu@kernel.org; Dexuan Cui
> <DECUI@microsoft.com>; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; Long Li
> <longli@microsoft.com>; Konstantin Taranov <kotaranov@microsoft.com>;
> horms@kernel.org; shradhagupta@linux.microsoft.com;
> ssengar@linux.microsoft.com; ernis@linux.microsoft.com;
> dipayanroy@linux.microsoft.com; Shiraz Saleem
> <shirazsaleem@microsoft.com>; sbhatta@marvell.com; linux-
> hyperv@vger.kernel.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-rdma@vger.kernel.org
> Subject: [PATCH net-next v3 1/2] net: mana: Move hardware counter stats
> from per-port to per-VF context
>
> Move hardware counter (HC) statistics from mana_port_context to
> mana_context to enable sharing stats across multiple network ports
> on the same MANA VF. Previously, each network port queried
> hardware counters independently using MANA_QUERY_GF_STAT command
> (GF = Generic Function stats from GDMA hardware), resulting in
> redundant queries when multiple ports existed on the same device.
>
> Isolate hardware counter stats by introducing mana_ethtool_hc_stats
> in mana_context and update the code to ensure all stats are properly
> reported via ethtool -S <interface>, maintaining consistency with
> previous behavior.
>
> Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>