Re: [PATCH net-next v3] eth: fbnic: Add PCIe hardware statistics

From: Andrew Lunn
Date: Sat Nov 09 2024 - 12:55:38 EST


> +static void fbnic_hw_stat_rst64(struct fbnic_dev *fbd, u32 reg, s32 offset,
> + struct fbnic_stat_counter *stat)
> +{
> + /* Record initial counter values and compute deltas from there to ensure
> + * stats start at 0 after reboot/reset. This avoids exposing absolute
> + * hardware counter values to userspace.

Now you are in debugfs, this convention from ethtool -S no longer
applies. You could simply this code a lot by exposing the absolute
values.

Andrew