[ofa-general] [PATCH/RFC] Add support for "send with invalidate" to libibverbs

Dotan Barak dotanb at dev.mellanox.co.il
Wed Apr 2 00:39:35 PDT 2008


Roland Dreier wrote:
> diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
> index a51bb9d..679386a 100644
> --- a/include/infiniband/verbs.h
> +++ b/include/infiniband/verbs.h
> @@ -92,7 +92,18 @@ enum ibv_device_cap_flags {
>  	IBV_DEVICE_SYS_IMAGE_GUID	= 1 << 11,
>  	IBV_DEVICE_RC_RNR_NAK_GEN	= 1 << 12,
>  	IBV_DEVICE_SRQ_RESIZE		= 1 << 13,
> -	IBV_DEVICE_N_NOTIFY_CQ		= 1 << 14
> +	IBV_DEVICE_N_NOTIFY_CQ		= 1 << 14,
> +	IBV_DEVICE_ZERO_STAG		= 1 << 15,
> +	/*
> +	 * IBV_DEVICE_KERNEL_SEND_W_INV is used by libibverbs to
> +	 * signal to low-level driver libraries that the kernel set
> +	 * the "send with invalidate" capaibility bit.  Applications
> +	 * should only test IBV_DEVICE_SEND_W_INV and never look at
> +	 * IBV_DEVICE_KERNEL_SEND_W_INV.
> +	 */
> +	IBV_DEVICE_KERNEL_SEND_W_INV	= 1 << 16,
> +	IBV_DEVICE_MEM_WINDOW		= 1 << 17,
> +	IBV_DEVICE_SEND_W_INV		= 1 << 21
>  };
>   
Why do you need the flag IBV_DEVICE_MEM_WINDOW?
If the value of device_attributes.num_mw is more than zero => the device 
supports memory windows, so i think this flag
can be safely removed.
>  
>  enum ibv_atomic_cap {
> @@ -492,7 +503,8 @@ enum ibv_send_flags {
>  	IBV_SEND_FENCE		= 1 << 0,
>  	IBV_SEND_SIGNALED	= 1 << 1,
>  	IBV_SEND_SOLICITED	= 1 << 2,
> -	IBV_SEND_INLINE		= 1 << 3
> +	IBV_SEND_INLINE		= 1 << 3,
> +	IBV_SEND_INVALIDATE	= 1 << 6
>  };
>  
I think that the send & invalidate should be a new opcode instead of a 
send flag.

Thanks
Dotan





More information about the general mailing list