On Fri, Feb 14, 2020 at 10:49:38AM -0500, Andrew Boyer wrote: > > > On Feb 14, 2020, at 9:54 AM, Jason Gunthorpe <jgg@xxxxxxxx> wrote: > > > > On Wed, Feb 12, 2020 at 11:14:17AM -0800, Jeff Kirsher wrote: > > ... > > New drivers are forbidden from calling this: > > > > /** > > * rdma_set_device_sysfs_group - Set device attributes group to have > > * driver specific sysfs entries at > > * for infiniband class. > > * > > * @device: device pointer for which attributes to be created > > * @group: Pointer to group which should be added when device > > * is registered with sysfs. > > * rdma_set_device_sysfs_group() allows existing drivers to expose one > > * group per device to have sysfs attributes. > > * > > * NOTE: New drivers should not make use of this API; instead new device > > * parameter should be exposed via netlink command. This API and mechanism > > * exist only for existing drivers. > > */ > > > > Jason > > Is there an existing field in RDMA_NLDEV_ATTR_* that allows us to > display a string to use as a replacement for the board_id in sysfs? I don't think so, this is highly vendor specific stuff. > Like “Mellanox ConnectX-3” or similar. General names like that can come from the pci database that udev and lspci keeps. Ie if you do 'systemctl -a' on a modern system with rdma-core you will see the PCI device description show up next to the verbs char device. > The other two sysfs fields (hca_type and hw_rev) seem to have been unused. I wonder if hw_rev was supposed to be the same as hw_ver (see ib_uverbs_query_device_resp). Jason