Re: [PATCH v3 rdma-next 2/5] RDMA/nldev: add provider-specific resource tracking

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

 



On Fri, Apr 20, 2018 at 02:01:14PM -0500, Steve Wise wrote:
> 
> > 
> > On Fri, Mar 30, 2018 at 11:03:36AM -0700, Steve Wise wrote:
> > >  enum rdma_nldev_attr {
> > >  	/* don't change the order or add anything between, this is ABI! */
> > >  	RDMA_NLDEV_ATTR_UNSPEC,
> > > @@ -390,6 +399,17 @@ enum rdma_nldev_attr {
> > >  	RDMA_NLDEV_ATTR_RES_PD_ENTRY,		/* nested table */
> > >  	RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY,	/* u32 */
> > >  	RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY,	/* u32 */
> > > +	/*
> > > +	 * provider-specific attributes.
> > > +	 */
> > > +	RDMA_NLDEV_ATTR_PROVIDER,		/* nested table */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_ENTRY,		/* nested
> > table */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_STRING,	/* string */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_PRINT_TYPE,	/* u8 */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_S32,		/* s32 */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_U32,		/* u32 */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_S64,		/* s64 */
> > > +	RDMA_NLDEV_ATTR_PROVIDER_U64,		/* u64 */
> > 
> > Also this is a good place to use our new DRIVER_ID thing.
> > 
> 
> DRIVER_ID?

enum rdma_driver_id {
        RDMA_DRIVER_UNKNOWN,
        RDMA_DRIVER_MLX5,
        RDMA_DRIVER_MLX4,
        RDMA_DRIVER_CXGB3,
        RDMA_DRIVER_CXGB4,
        RDMA_DRIVER_MTHCA,
        RDMA_DRIVER_BNXT_RE,
        RDMA_DRIVER_OCRDMA,
        RDMA_DRIVER_NES,
        RDMA_DRIVER_I40IW,
        RDMA_DRIVER_VMW_PVRDMA,
        RDMA_DRIVER_QEDR,
        RDMA_DRIVER_HNS,
        RDMA_DRIVER_USNIC,
        RDMA_DRIVER_RXE,
        RDMA_DRIVER_HFI1,
        RDMA_DRIVER_QIB,
};

> >
> > If you send that integer when the RDMA_NLDEV_ATTR_PROVIDER is opened
> > then the userspace at least knows what driver sent the data..
> > 
> 
> The provider-specific data comes along with the core resource attributes for
> a given resource query.  It isn't like an application can query just
> provider attributes.  It queries a resource or set of them or all of them,
> and it gets back core+provide attrs for each resource.

It is not about the query, it is about having the data be
self-describing.. There is no easy way to guess what the underlying
device is to interpret the strings.

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