From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yishai Hadas Subject: [PATCH rdma-next 16/16] IB/mlx5: Expose max_counter_sets capability Date: Thu, 19 Oct 2017 17:41:58 +0300 Message-ID: <1508424118-27205-17-git-send-email-yishaih@mellanox.com> References: <1508424118-27205-1-git-send-email-yishaih@mellanox.com> Return-path: In-Reply-To: <1508424118-27205-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, raeds-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org, majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org List-Id: linux-rdma@vger.kernel.org From: Raed Salem max_counter_sets represents the number of different counter sets exposed and makes the upper limit for the counter set id provided to describe/create counter sets verbs i.e. counter set id must be in range [0, max_counter_sets - 1]. Counter set id will be used with counter set object in downstream patches. Signed-off-by: Raed Salem Reviewed-by: Yishai Hadas --- 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 46ac67b..499d694 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -601,6 +601,9 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, return -EINVAL; memset(props, 0, sizeof(*props)); + props->max_counter_sets = + dev->counter_sets.max_counter_sets; + err = mlx5_query_system_image_guid(ibdev, &props->sys_image_guid); if (err) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html