[ofa-general] enabling invalidate operations in libibverbs API

Or Gerlitz ogerlitz at voltaire.com
Tue Jun 10 23:36:23 PDT 2008


Roland Dreier wrote:
> @@ -486,7 +500,11 @@ enum ibv_wr_opcode {
> +	IBV_WR_LSO,
LSO is not exposed to user space by this patch, so maybe better to just 
reserve/skip this enum value?

> --- a/src/cmd.c
> +++ b/src/cmd.c
> @@ -159,6 +159,18 @@ int ibv_cmd_query_device(struct ibv_context *context,
> +	/*
> +	 * If the kernel driver says that it supports memory
> +	 * management extensions, then move the flag to
> +	 * IBV_DEVICE_KERN_MEM_MGT_EXTENSIONS so that the low-level
> +	 * driver needs to move the flag back to show it supports the
> +	 * operations as well.
> +	 */
> +	if (device_attr->device_cap_flags & IBV_DEVICE_MEM_MGT_EXTENSIONS) {
> +		device_attr->device_cap_flags &= ~IBV_DEVICE_MEM_MGT_EXTENSIONS;
> +		device_attr->device_cap_flags |= IBV_DEVICE_KERN_MEM_MGT_EXTENSIONS;
> +	}
this sets IBV_DEVICE_MEM_MGT_EXTENSIONS off and the 
IBV_DEVICE_KERN_MEM_MGT_EXTENSIONS on, correct?
> --- a/src/verbs.c
> +++ b/src/verbs.c
> @@ -79,7 +79,13 @@ enum ibv_rate mult_to_ibv_rate(int mult)
>  int __ibv_query_device(struct ibv_context *context,
>  		       struct ibv_device_attr *device_attr)
>  {
> -	return context->ops.query_device(context, device_attr);
> +	int ret;
> +
> +	ret = context->ops.query_device(context, device_attr);
> +
> +	device_attr->device_cap_flags &= ~IBV_DEVICE_KERN_MEM_MGT_EXTENSIONS;
and this sets  IBV_DEVICE_KERN_MEM_MGT_EXTENSIONS off, so at the bottom 
line the user will never see IBV_DEVICE_MEM_MGT_EXTENSIONS being set to 
ON? or the user space hw library should somwhow add this bit?

Or.




More information about the general mailing list