From patchwork Tue Oct 9 18:45:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10633145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DD83933 for ; Tue, 9 Oct 2018 18:46:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 242F5294F9 for ; Tue, 9 Oct 2018 18:46:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17CEA294FD; Tue, 9 Oct 2018 18:46:51 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 B4535294F9 for ; Tue, 9 Oct 2018 18:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726728AbeJJCFK (ORCPT ); Tue, 9 Oct 2018 22:05:10 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34699 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726647AbeJJCFJ (ORCPT ); Tue, 9 Oct 2018 22:05:09 -0400 Received: by mail-wr1-f67.google.com with SMTP id l6-v6so2546759wrt.1 for ; Tue, 09 Oct 2018 11:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5NZZeIjuVvP2+M9CQhp6KEz2lK0JIAzjiH54akdMr54=; b=hxi6fu2dDm4zaX8UYATYkFpHqmILGR6cHtj3RYldQRt6PSHmg4N7i8Jv8HFJgHbzIJ qWjdF+uBq4JBEw3S6FoEt9xwpi33v7W1wquyqOHsGnO7js1YXNnkuMjKo0GSD60yeFfH JXGL6YKoIJZA554j4I7yUZpNs7MxfNL1a0GnJThobYCeR/BbFPMU5zjo6/O5RhDjxBRn YiQgqFcFBxeghZKXVGsS5nDVBdNg8WHU4Wrp/rAq9Xd1SQ+u5ZlnwJT5Jer8CIkjXDes RJraAT7TRaAfrXqOLRT1dOk30EoO+RRp4ZtDFAnehCVvTk03TzEvluVCZJZhFZiJDm2K NjaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5NZZeIjuVvP2+M9CQhp6KEz2lK0JIAzjiH54akdMr54=; b=gcr5zLmgQtBAVXhNFJbbfx/fRc29/YCVs+ygbL7PxWC4/7HW6HE75EZUDk6csQRFUg Wvg+rF4FVTZqu8yNYc4XYVv+YVtnHqBOU2f9Y2cLrhZHDAt30pyVDDX7EdKoRV5tN+3d FQS8oUz8k5+f6ne8v0lOhGpKWZinwIoTBvO1x/gwohKiVospnkrle9gqx+r8m7xPoj7m Fu8Ez13hAIIA0g7lS2DIjuV7GPicqzgUZvLSQvNtJNxMXVQk3DF4AqIP1JBNdvqYEYtN 2Spg/Csc7XPftPSc9XlHQQqy3UvxWqtXMnN3Ze0t+i4nGtZxbW3LyKm+yNfpU6uzoH1j axew== X-Gm-Message-State: ABuFfojirZlYLh5teLwv7asbxSCXG10b7ZU5maKON9aT+HbV5qTTTK8m AZZnn8HiCrrgF7hbk16tX+8= X-Google-Smtp-Source: ACcGV62oiuf9SyR6P7FXR/fC1s1ecax2jaXGa7lGIRHQJOKBsJrEo3zJtNK+4aJDMImnbkAzpSg6hg== X-Received: by 2002:adf:f681:: with SMTP id v1-v6mr22293098wrp.201.1539110808256; Tue, 09 Oct 2018 11:46:48 -0700 (PDT) Received: from localhost.localdomain (bzq-79-179-121-186.red.bezeqint.net. [79.179.121.186]) by smtp.gmail.com with ESMTPSA id r16-v6sm27093327wrv.21.2018.10.09.11.46.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 11:46:47 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next 02/18] RDMA/bnxt_re: Initialize ib_device_ops struct Date: Tue, 9 Oct 2018 21:45:31 +0300 Message-Id: <20181009184547.5907-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20181009184547.5907-1-kamalheib1@gmail.com> References: <20181009184547.5907-1-kamalheib1@gmail.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 Initialize ib_device_ops with the supported operations. Signed-off-by: Kamal Heib --- drivers/infiniband/hw/bnxt_re/main.c | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 73632e5b819f..14cd92bd300f 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -572,6 +572,50 @@ static void bnxt_re_unregister_ib(struct bnxt_re_dev *rdev) ib_unregister_device(&rdev->ibdev); } +static struct ib_device_ops bnxt_re_dev_ops = { + .query_device = bnxt_re_query_device, + .modify_device = bnxt_re_modify_device, + .query_port = bnxt_re_query_port, + .get_port_immutable = bnxt_re_get_port_immutable, + .get_dev_fw_str = bnxt_re_query_fw_str, + .query_pkey = bnxt_re_query_pkey, + .get_netdev = bnxt_re_get_netdev, + .add_gid = bnxt_re_add_gid, + .del_gid = bnxt_re_del_gid, + .get_link_layer = bnxt_re_get_link_layer, + .alloc_pd = bnxt_re_alloc_pd, + .dealloc_pd = bnxt_re_dealloc_pd, + .create_ah = bnxt_re_create_ah, + .modify_ah = bnxt_re_modify_ah, + .query_ah = bnxt_re_query_ah, + .destroy_ah = bnxt_re_destroy_ah, + .create_srq = bnxt_re_create_srq, + .modify_srq = bnxt_re_modify_srq, + .query_srq = bnxt_re_query_srq, + .destroy_srq = bnxt_re_destroy_srq, + .post_srq_recv = bnxt_re_post_srq_recv, + .create_qp = bnxt_re_create_qp, + .modify_qp = bnxt_re_modify_qp, + .query_qp = bnxt_re_query_qp, + .destroy_qp = bnxt_re_destroy_qp, + .post_send = bnxt_re_post_send, + .post_recv = bnxt_re_post_recv, + .create_cq = bnxt_re_create_cq, + .destroy_cq = bnxt_re_destroy_cq, + .poll_cq = bnxt_re_poll_cq, + .req_notify_cq = bnxt_re_req_notify_cq, + .get_dma_mr = bnxt_re_get_dma_mr, + .dereg_mr = bnxt_re_dereg_mr, + .alloc_mr = bnxt_re_alloc_mr, + .map_mr_sg = bnxt_re_map_mr_sg, + .reg_user_mr = bnxt_re_reg_user_mr, + .alloc_ucontext = bnxt_re_alloc_ucontext, + .dealloc_ucontext = bnxt_re_dealloc_ucontext, + .mmap = bnxt_re_mmap, + .get_hw_stats = bnxt_re_ib_get_hw_stats, + .alloc_hw_stats = bnxt_re_ib_alloc_hw_stats, +}; + static int bnxt_re_register_ib(struct bnxt_re_dev *rdev) { struct ib_device *ibdev = &rdev->ibdev; @@ -671,6 +715,7 @@ static int bnxt_re_register_ib(struct bnxt_re_dev *rdev) ibdev->alloc_hw_stats = bnxt_re_ib_alloc_hw_stats; ibdev->driver_id = RDMA_DRIVER_BNXT_RE; + ib_set_device_ops(ibdev, &bnxt_re_dev_ops); return ib_register_device(ibdev, "bnxt_re%d", NULL); }