Re: [net-next PATCH] octeontx2-pf: Reset MAC stats during probe

From: Sai Krishna Gajula
Date: Mon Jan 29 2024 - 04:51:49 EST



> -----Original Message-----
> From: Jakub Kicinski <kuba@xxxxxxxxxx>
> Sent: Friday, January 26, 2024 6:58 AM
> To: Sai Krishna Gajula <saikrishnag@xxxxxxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; pabeni@xxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Sunil Kovvuri
> Goutham <sgoutham@xxxxxxxxxxx>; Geethasowjanya Akula
> <gakula@xxxxxxxxxxx>; Hariprasad Kelam <hkelam@xxxxxxxxxxx>;
> Subbaraya Sundeep Bhatta <sbhatta@xxxxxxxxxxx>
> Subject: Re: [net-next PATCH] octeontx2-pf: Reset MAC stats during
> probe
>
> On Thu, 25 Jan 2024 16:36:01 +0530 Sai Krishna wrote:
> > Reset CGX/RPM MAC HW statistics at the time of driver probe()
> >
> > Also added a devlink option to do the same at runtime, this will be
> > helpful during debug.
> >
> > Usage: Reset MAC stats
> > devlink dev param set pci/0002:03:00.0 name mac_stats_reset value
> > true cmode runtime
>
> Where are the stats reported? It'd be more intuitive to add the ability to
> reset stats to whatever interface is used to report them. Or one of your reset
> interfaces (devlink dev reload).

We are using debugfs interface to report the stats. As you had indicated previously not to take input to debugfs, we implemented devlink interface to reset the MAC stats.