RE: [PATCH 01/13] RDMA: Split the alloc_hw_stats() ops to port and device variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH 01/13] RDMA: Split the alloc_hw_stats() ops to port and
> device variants
> 
> On Tue, May 18, 2021 at 09:58:28PM +0000, Saleem, Shiraz wrote:
> > > Subject: Re: [PATCH 01/13] RDMA: Split the alloc_hw_stats() ops to
> > > port and device variants
> > >
> > > On Tue, May 18, 2021 at 12:18:13AM +0000, Saleem, Shiraz wrote:
> > >
> > > > > What does the sysfs look like? Aren't there duplicated HW stats?
> > > >
> > > >
> > > > Yeah it is duplicated. So we are saying for phys_port_cnt = 1, we
> > > > want the stats to show up in only place?
> > >
> > > Yes.
> > >
> > > Imagine you had a multi port device, and assign the stats appropriately.
> > >
> > > I didn't see anything in the list that made me think "device stat"
> > > but I don't know what several of these do
> >
> > Are we exporting port stat when it should be really be device stat in some of the
> drivers though?
> >
> > Most vendor drivers do port stats allocation only. Like...
> > https://elixir.bootlin.com/linux/v5.13-rc2/source/drivers/infiniband/h
> > w/cxgb4/provider.c#L392
> > https://elixir.bootlin.com/linux/v5.13-rc2/source/drivers/infiniband/s
> > w/rxe/rxe_hw_counters.c#L27
> 
> Yes they don't have global device counters, presumably because they only have 1
> port.
> 
> > However .get_hw_stats callback appears to extract from same set of
> > registers for each port
> 
> Most devices should only have port counters
> 
> > > If you can confirm that these are all port stats I can delete the
> > > device stats in this series.
> >
> > So your device and port stats op callback separation feels warranted.
> 
> So should I delete the device counters here?

For i40iw, yes. Just expose port stats and NULL out the device stat op.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux