Re: [PATCH rdma-next 8/8] IB/mlx5: Exposure offload arithmetic operations

Max Gurtovoy
2016-02-28T22:40:52Z

On 2/20/2016 9:47 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> Advertise the offload arithmetic operations support.
>
> Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/hw/mlx5/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index 03c418c..9e92f48 100644
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -549,6 +549,9 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
> if (MLX5_CAP_GEN(mdev, cd))
> props->device_cap_flags |= IB_DEVICE_CROSS_CHANNEL;
>
> + if (MLX5_CAP_GEN(dev->mdev, vector_calc))
> + props->device_cap_flags |= IB_DEVICE_VECTOR_CALC;

won't you like to advertise max_vector_count cap ?

props->calc_caps.max_vector_count =
MLX5_CAP_VECTOR_CALC(dev->mdev, max_vec_count);

> +
> return 0;
> }
>
>