> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Monday, February 24, 2025 8:41 PM > > On Sat, Feb 22, 2025 at 06:34:21PM +0000, Parav Pandit wrote: > > ib_setup_device_attrs() should be merged to ib_setup_port_attrs() by > > renaming ib_setup_port_attrs() to be generic. To utilize the group > > initialization ib_setup_port_attrs() needs to move up before > > device_add(). > > It needs more than that, somehow you have to maintain two groups list or > somehow remove the coredev->dev.groups assignment.. > I was thinking that if both device and port attr setup is done in same function, there is knowledge of is_full_dev that can be used for device level hw_stats setup. (similar to how its done at port level). > Jason