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 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/hw/cxgb4/provider.c#L392
https://elixir.bootlin.com/linux/v5.13-rc2/source/drivers/infiniband/sw/rxe/rxe_hw_counters.c#L27

However .get_hw_stats callback appears to extract from same set of registers for each port

>
> If you can confirm that these are all port stats I can delete the device stats in this
> series.
> 

hfi1 seems to have this separation between device and port stat with a different set of counters
https://elixir.bootlin.com/linux/v5.13-rc2/source/drivers/infiniband/hw/hfi1/verbs.c#L1760

So your device and port stats op callback separation feels warranted.





[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