Re: [PATCH rdma-core] libibverbs/examples: Add missing device attributes

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

 



On Mon, Mar 07, 2022 at 10:03:25AM +0000, yangx.jy@xxxxxxxxxxx wrote:
> On 2022/2/11 20:41, Jason Gunthorpe wrote:
> > On Wed, Feb 09, 2022 at 10:59:08AM +0200, Leon Romanovsky wrote:
> >> On Wed, Feb 09, 2022 at 10:53:08AM +0800, Xiao Yang wrote:
> >>> make ibv_devinfo command show more device attributes.
> >>>
> >>> Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxx>
> >>>   libibverbs/examples/devinfo.c | 29 +++++++++++++++++++++++++----
> >>>   libibverbs/verbs.h            | 13 ++++++++++---
> >>>   2 files changed, 35 insertions(+), 7 deletions(-)
> >> I have a feeling that a long time ago, we had a discussion if and how
> >> expose device capabilities and the decision was that we don't report
> >> in-kernel specific device caps.
> > Right, it is kernel bug they leak out in the first place.
> >
> >>> diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
> >>> index a9f182ff..68591c7b 100644
> >>> +++ b/libibverbs/verbs.h
> >>> @@ -136,7 +136,9 @@ enum ibv_device_cap_flags {
> >>>   	IBV_DEVICE_MEM_WINDOW_TYPE_2B	= 1 << 24,
> >>>   	IBV_DEVICE_RC_IP_CSUM		= 1 << 25,
> >>>   	IBV_DEVICE_RAW_IP_CSUM		= 1 << 26,
> >>> -	IBV_DEVICE_MANAGED_FLOW_STEERING = 1 << 29
> >>> +	IBV_DEVICE_CROSS_CHANNEL	= 1 << 27,
> >>> +	IBV_DEVICE_MANAGED_FLOW_STEERING = 1 << 29,
> >>> +	IBV_DEVICE_INTEGRITY_HANDOVER	= 1 << 30
> >>>   };
> >>>   
> >>>   enum ibv_fork_status {
> >>> @@ -149,8 +151,13 @@ enum ibv_fork_status {
> >>>    * Can't extended above ibv_device_cap_flags enum as in some systems/compilers
> >>>    * enum range is limited to 4 bytes.
> >>>    */
> >>> -#define IBV_DEVICE_RAW_SCATTER_FCS (1ULL << 34)
> >>> -#define IBV_DEVICE_PCI_WRITE_END_PADDING (1ULL << 36)
> >>> +#define IBV_DEVICE_ON_DEMAND_PAGING		(1ULL << 31)
> >>> +#define IBV_DEVICE_SG_GAPS_REG			(1ULL << 32)
> >>> +#define IBV_DEVICE_VIRTUAL_FUNCTION		(1ULL << 33)
> >>> +#define IBV_DEVICE_RAW_SCATTER_FCS		(1ULL << 34)
> >>> +#define IBV_DEVICE_RDMA_NETDEV_OPA		(1ULL << 35)
> >>> +#define IBV_DEVICE_PCI_WRITE_END_PADDING	(1ULL << 36)
> >>> +#define IBV_DEVICE_ALLOW_USER_UNREG		(1ULL << 37)
> > And don't copy ABI into header like this, the kernel parts need to be
> > moved to the kernel uabi header and cleaned
> 
> Hi Jason, Leon
> 
> Sorry, it's not clear to me.
> 
> 1) Is it necessary to add these missing attributes?
> 
> 2) If necessary, do you think they need to be moved into 
> kernel-headers/rdma?

We wanted to say that these device supported capabilities shouldn't be
added to ibv_devinfo.

Thanks

> 
> Best Regards,
> 
> Xiao Yang
> 
> >
> > 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