Re: [PATCH] rdma-core: Recognize IBV_DEVICE_LOCAL_DMA_LKEY in ibv_devinfo

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

 



On Mon, Nov 25, 2019 at 07:22:37AM -0800, Andrew Boyer wrote:
> This bit is defined in the kernel but not displayed by ibv_devinfo.
> 
> Signed-off-by: Andrew Boyer <aboyer@xxxxxxxxxxx>
>  libibverbs/examples/devinfo.c | 3 +++
>  libibverbs/verbs.h            | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c
> index bf53eac2..e3210f6e 100644
> +++ b/libibverbs/examples/devinfo.c
> @@ -220,6 +220,7 @@ static void print_device_cap_flags(uint32_t dev_cap_flags)
>  				   IBV_DEVICE_RC_RNR_NAK_GEN |
>  				   IBV_DEVICE_SRQ_RESIZE |
>  				   IBV_DEVICE_N_NOTIFY_CQ |
> +				   IBV_DEVICE_LOCAL_DMA_LKEY |
>  				   IBV_DEVICE_MEM_WINDOW |
>  				   IBV_DEVICE_UD_IP_CSUM |
>  				   IBV_DEVICE_XRC |
> @@ -260,6 +261,8 @@ static void print_device_cap_flags(uint32_t dev_cap_flags)
>  		printf("\t\t\t\t\tSRQ_RESIZE\n");
>  	if (dev_cap_flags & IBV_DEVICE_N_NOTIFY_CQ)
>  		printf("\t\t\t\t\tN_NOTIFY_CQ\n");
> +	if (dev_cap_flags & IBV_DEVICE_LOCAL_DMA_LKEY)
> +		printf("\t\t\t\t\tLOCAL_DMA_LKEY\n");
>  	if (dev_cap_flags & IBV_DEVICE_MEM_WINDOW)
>  		printf("\t\t\t\t\tMEM_WINDOW\n");
>  	if (dev_cap_flags & IBV_DEVICE_UD_IP_CSUM)
> diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
> index 7b8d4310..81e5812c 100644
> +++ b/libibverbs/verbs.h
> @@ -112,6 +112,7 @@ enum ibv_device_cap_flags {
>  	IBV_DEVICE_RC_RNR_NAK_GEN	= 1 << 12,
>  	IBV_DEVICE_SRQ_RESIZE		= 1 << 13,
>  	IBV_DEVICE_N_NOTIFY_CQ		= 1 << 14,
> +	IBV_DEVICE_LOCAL_DMA_LKEY	= 1 << 15,
>  	IBV_DEVICE_MEM_WINDOW           = 1 << 17,
>  	IBV_DEVICE_UD_IP_CSUM		= 1 << 18,
>  	IBV_DEVICE_XRC			= 1 << 20,

This flag really only has meaning for the kernel, it should come out
of the uapi at all.

It is a mistake that kernel internal bits have been mixed in with
userspace bits.

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