[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa164612-0009-4ae3-811f-b349c625e162@intel.com>
Date: Tue, 26 Aug 2025 16:32:14 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<andrew+netdev@...n.ch>, <horms@...nel.org>, <mohsin.bashr@...il.com>,
<vadim.fedorenko@...ux.dev>
Subject: Re: [PATCH net-next v2 2/6] eth: fbnic: Reset hw stats upon PCI error
On 8/25/2025 1:02 PM, Jakub Kicinski wrote:
> From: Mohsin Bashir <mohsin.bashr@...il.com>
>
> Upon experiencing a PCI error, fbnic reset the device to recover from
> the failure. Reset the hardware stats as part of the device reset to
> ensure accurate stats reporting.
>
> Note that the reset is not really resetting the aggregate value to 0,
> which may result in a spike for a system collecting deltas in stats.
> Rather, the reset re-latches the current value as previous, in case HW
> got reset.
>
Good. This means stats should stay relatively stable across reset, while
preventing glitches if the HW stat itself reset. Makes sense.
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
> index 8190f49e1426..953297f667a2 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
> @@ -491,6 +491,8 @@ static void __fbnic_pm_attach(struct device *dev)
> struct net_device *netdev = fbd->netdev;
> struct fbnic_net *fbn;
>
> + fbnic_reset_hw_stats(fbd);
> +
> if (fbnic_init_failure(fbd))
> return;
>
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists