Subject: Re: [RFC PATCH v4 18/25] RDMA/irdma: Implement device supported verb APIs

From: Jason Gunthorpe <[email-masked]>
Date: Fri, 14 Feb 2020 10:54:43 -0400

On Wed, Feb 12, 2020 at 11:14:17AM -0800, Jeff Kirsher wrote:

> +/**
> + * irdma_ib_register_device - register irdma device to IB core
> + * @iwdev: irdma device
> + */
> +int irdma_ib_register_device(struct irdma_device *iwdev)
> +{
> +	int ret;
> +
> +	ret = irdma_init_rdma_device(iwdev);
> +	if (ret)
> +		return ret;
> +
> +	rdma_set_device_sysfs_group(&iwdev->ibdev, &irdma_attr_group);

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