From patchwork Thu Oct 19 14:41:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10017313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95BD6600CC for ; Thu, 19 Oct 2017 14:43:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A00A28D90 for ; Thu, 19 Oct 2017 14:43:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7EE3728D94; Thu, 19 Oct 2017 14:43:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39BFF28D90 for ; Thu, 19 Oct 2017 14:43:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752474AbdJSOm6 (ORCPT ); Thu, 19 Oct 2017 10:42:58 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:54930 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752650AbdJSOmw (ORCPT ); Thu, 19 Oct 2017 10:42:52 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 19 Oct 2017 16:42:44 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v9JEgihw032365; Thu, 19 Oct 2017 17:42:44 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v9JEgivf027440; Thu, 19 Oct 2017 17:42:44 +0300 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v9JEgiqi027439; Thu, 19 Oct 2017 17:42:44 +0300 From: Yishai Hadas To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, yishaih@mellanox.com, raeds@mellanox.com, majd@mellanox.com 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> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1508424118-27205-1-git-send-email-yishaih@mellanox.com> References: <1508424118-27205-1-git-send-email-yishaih@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)