Re: [PATCH rdma-core 4/5] verbs: Add an option to provide vendor private data when creating a CQ

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

 



On Mon, Mar 06, 2017 at 04:06:43PM +0200, Yishai Hadas wrote:
> From: Bodong Wang <bodong@xxxxxxxxxxxx>
> 
> This patch drops the need to extend the verbs layer each time with
> some non generic fields when creating a CQ. It adds an option to set
> some opaque vendor data in some generic way which can fit any vendor.
> 
> The solution introduced for creating a CQ but expects to fit for
> other IB objects as of QP, SRQ, etc.
> 
> It comes as a pre-patch for supplying some private mlx5 fields in
> downstream patches.
> 
> The solution:
> 1) Introduce a new comp_mask bit (i.e. IBV_CQ_INIT_ATTR_MASK_VENDOR_DATA)
>    and a matching void* vendor data field.
> 
> 2) Vendor should expose its header file for direct access with
>    relevant private structures.
> 
> 3) Application should supply the input based on vendor-defined structure.
> 
> 4) Upon getting the private data the vendor will cast to its internal
>    structure and use the data as part of CQ creation.

I'm not sure I like this, why not create a mlx5dv_create_cq?

struct ibv_cq_ex *mlx5dv_create_cq_ex(struct mlx5dv_context *context,
                                   struct ibv_cq_init_attr_ex *cq_attr,
				   struct mlx5_.... *vendor_data)

Seems much more type safe to me.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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