Re: [PATCH v4 01/23] iidc: Introduce iidc.h

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

 



On Tue, Apr 06, 2021 at 04:01:03PM -0500, Shiraz Saleem wrote:

> +/* Following APIs are implemented by core PCI driver */
> +struct iidc_core_ops {
> +	/* APIs to allocate resources such as VEB, VSI, Doorbell queues,
> +	 * completion queues, Tx/Rx queues, etc...
> +	 */
> +	int (*alloc_res)(struct iidc_core_dev_info *cdev_info,
> +			 struct iidc_res *res,
> +			 int partial_acceptable);
> +	int (*free_res)(struct iidc_core_dev_info *cdev_info,
> +			struct iidc_res *res);
> +
> +	int (*request_reset)(struct iidc_core_dev_info *cdev_info,
> +			     enum iidc_reset_type reset_type);
> +
> +	int (*update_vport_filter)(struct iidc_core_dev_info *cdev_info,
> +				   u16 vport_id, bool enable);
> +	int (*vc_send)(struct iidc_core_dev_info *cdev_info, u32 vf_id, u8 *msg,
> +		       u16 len);
> +};

What is this? There is only one implementation:

static const struct iidc_core_ops ops = {
	.alloc_res			= ice_cdev_info_alloc_res,
	.free_res			= ice_cdev_info_free_res,
	.request_reset			= ice_cdev_info_request_reset,
	.update_vport_filter		= ice_cdev_info_update_vsi_filter,
	.vc_send			= ice_cdev_info_vc_send,
};

So export and call the functions directly.

We just had this very same discussion with Broadcom.

I notice there is no module dependency between irdma and the ethernet
driver because the above ops are avoiding it.

This entire idea was already NAK'd once:

https://lore.kernel.org/linux-rdma/20180522203831.20624-1-jeffrey.t.kirsher@xxxxxxxxx/

So please remove it.

Jason



[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