netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jakub Kicinski <kuba@kernel.org>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <edumazet@google.com>,
	<pabeni@redhat.com>, <andrew+netdev@lunn.ch>, <horms@kernel.org>,
	<mohsin.bashr@gmail.com>, <vadim.fedorenko@linux.dev>
Subject: Re: [PATCH net-next v2 2/6] eth: fbnic: Reset hw stats upon PCI error
Date: Tue, 26 Aug 2025 16:32:14 -0700	[thread overview]
Message-ID: <fa164612-0009-4ae3-811f-b349c625e162@intel.com> (raw)
In-Reply-To: <20250825200206.2357713-3-kuba@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 1429 bytes --]



On 8/25/2025 1:02 PM, Jakub Kicinski wrote:
> From: Mohsin Bashir <mohsin.bashr@gmail.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@intel.com>

> Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.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;
>  


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2025-08-26 23:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 20:02 [PATCH net-next v2 0/6] eth: fbnic: Extend hw stats support Jakub Kicinski
2025-08-25 20:02 ` [PATCH net-next v2 1/6] eth: fbnic: Move hw_stats_lock out of fbnic_dev Jakub Kicinski
2025-08-26 23:31   ` Jacob Keller
2025-08-25 20:02 ` [PATCH net-next v2 2/6] eth: fbnic: Reset hw stats upon PCI error Jakub Kicinski
2025-08-26 23:32   ` Jacob Keller [this message]
2025-08-25 20:02 ` [PATCH net-next v2 3/6] eth: fbnic: Reset MAC stats Jakub Kicinski
2025-08-26 23:33   ` Jacob Keller
2025-08-25 20:02 ` [PATCH net-next v2 4/6] eth: fbnic: Fetch PHY stats from device Jakub Kicinski
2025-08-26 23:35   ` Jacob Keller
2025-08-25 20:02 ` [PATCH net-next v2 5/6] eth: fbnic: Read PHY stats via the ethtool API Jakub Kicinski
2025-08-26 23:35   ` Jacob Keller
2025-08-25 20:02 ` [PATCH net-next v2 6/6] eth: fbnic: Add pause stats support Jakub Kicinski
2025-08-26 23:36   ` Jacob Keller
2025-08-28  2:00 ` [PATCH net-next v2 0/6] eth: fbnic: Extend hw " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa164612-0009-4ae3-811f-b349c625e162@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).