Re: [PATCH rdma-core] mlx4: Enable WQ creation with IBV_WQ_FLAGS_SCATTER_FCS

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

 



On Tue, Mar 27, 2018 at 12:37:22PM +0300, Yishai Hadas wrote:
> From: Guy Levi <guyle@xxxxxxxxxxxx>
>
> Enable WQ creation with the IBV_WQ_FLAGS_SCATTER_FCS flag.
>
> Prior to using this option an application should check whether the
> IBV_RAW_PACKET_CAP_SCATTER_FCS capability is set on the device's
> raw_packet_caps.
>
> Signed-off-by: Guy Levi <guyle@xxxxxxxxxxxx>
> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
> ---
>
> PR was sent:
> https://github.com/linux-rdma/rdma-core/pull/314
>
>  providers/mlx4/verbs.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c
> index 9d8d340..534838b 100644
> --- a/providers/mlx4/verbs.c
> +++ b/providers/mlx4/verbs.c
> @@ -1422,7 +1422,13 @@ struct ibv_wq *mlx4_create_wq(struct ibv_context *context,
>  		}
>  	}
>
> -	if (attr->comp_mask) {
> +	if (!check_comp_mask(attr->comp_mask, IBV_WQ_INIT_ATTR_FLAGS)) {
> +		errno = ENOTSUP;

It will be great to use variant "errno = EINVAL" as it is done in other cases.

> +		return NULL;
> +	}
> +
> +	if ((attr->comp_mask & IBV_WQ_INIT_ATTR_FLAGS) &&
> +	    (attr->create_flags & ~IBV_WQ_FLAGS_SCATTER_FCS)) {
>  		errno = ENOTSUP;
>  		return NULL;
>  	}
> --
> 1.8.3.1
>
> --
> 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

Attachment: signature.asc
Description: PGP signature


[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