diff mbox

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

Message ID 1455954465-15141-9-git-send-email-leon@leon.nu (mailing list archive)
State Superseded
Headers show

Commit Message

Leon Romanovsky Feb. 20, 2016, 7:47 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

Advertise the offload arithmetic operations support.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Max Gurtovoy Feb. 28, 2016, 10:40 p.m. UTC | #1
On 2/20/2016 9:47 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> Advertise the offload arithmetic operations support.
>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> Reviewed-by: Matan Barak <matanb@mellanox.com>
> ---
>   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;
>   }
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
+
 	return 0;
 }