From patchwork Tue Oct 9 18:45:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10633149 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 1BC2116B1 for ; Tue, 9 Oct 2018 18:46:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 111C2294F9 for ; Tue, 9 Oct 2018 18:46:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05C21294FD; Tue, 9 Oct 2018 18:46:54 +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 9CC4F294FA for ; Tue, 9 Oct 2018 18:46:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbeJJCFM (ORCPT ); Tue, 9 Oct 2018 22:05:12 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45096 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726525AbeJJCFL (ORCPT ); Tue, 9 Oct 2018 22:05:11 -0400 Received: by mail-wr1-f68.google.com with SMTP id q5-v6so2938292wrw.12 for ; Tue, 09 Oct 2018 11:46:50 -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=ZYHOisxPW8Qr1x8eT4M4ISdrOrW8nh2A6gEtGiGPXhU=; b=BRx5yj142KD0gMwwGR7EDXBh4MzlLmEh86Uj499Szx9NjYCFQOlBljxOC+BG9yN2db Vwf6EJGsLkZKZpDvMBH+y2FMzCdQ28dcYSoyYdd+gM5XtrPkujq7YixeNAU8AOW8K3py qpldCYVXOCrgyRw1yvz/7/7B9tibYnQcbs21chaSZngenlU7Z+oOTPlNKAvkhf+iGgox 9Ov+vZnZGZP5NF5mX1u4PCgp+8nE8p7WrQlHYDxi2mHEmsf8RmHQlCT/4Fi8aRkj4e2Z hjmaoMxm0D553DRI+WlS6TcfGsJRfe5zYGHqTwxGRobJTi78cGrnCwevi+2gQogkE4Rx G0Qg== 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=ZYHOisxPW8Qr1x8eT4M4ISdrOrW8nh2A6gEtGiGPXhU=; b=ZoI9AGfuxV46u7fBh/dW5eVGMuGTMiLA1yquzsfXhmUX/uVgjDMQBq5bhdX0HG05Va 5WZ9BJ4Lg8BfZsgmvfKb/ixs069/8usbV5qvpfbdppbz7ge7Kt0CPwyIKopNy+R1yrPW h8wnk+JbZiIIrn85nxPaLDep0oNfOG+v8m4NI0yHOmume6Va9rxjlqbN2rp7Z9f373Z6 LYGhdRkYpOU1FIXcv3Lv5NipMcvcP37/GLsvu6TaxT0338EofoP56vzSBTlqJx5tY8CR /gb4cqOzfRCCqzXGNZC4JEOAmWyV0BgJCHy1hYk2IpG3MWrhOzIbIlwHrkeuXLek+veG CDpA== X-Gm-Message-State: ABuFfojvHpK5e48d7LjX59POy8AYtl2lOr7LDYyesrg0xo2UT3hqqKrf BYIGgXecjYI+XPrAEHevmma778zK X-Google-Smtp-Source: ACcGV60B2HuU5hVRX9H+qH5wHA9c93QwznqhMphsLIfLDucP8nV4Klz2UUFn6eP69122fGhknwjxwQ== X-Received: by 2002:adf:f14a:: with SMTP id y10-v6mr20294353wro.29.1539110809576; Tue, 09 Oct 2018 11:46:49 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 11:46:49 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next 03/18] RDMA/cxgb3: Initialize ib_device_ops struct Date: Tue, 9 Oct 2018 21:45:32 +0300 Message-Id: <20181009184547.5907-4-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/cxgb3/iwch_provider.c | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 39530cc15f95..4fe13dd1ef7d 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c @@ -1313,6 +1313,39 @@ static void get_dev_fw_ver_str(struct ib_device *ibdev, char *str) snprintf(str, IB_FW_VERSION_NAME_MAX, "%s", info.fw_version); } +static struct ib_device_ops iwch_dev_ops = { + .query_device = iwch_query_device, + .query_port = iwch_query_port, + .query_pkey = iwch_query_pkey, + .query_gid = iwch_query_gid, + .alloc_ucontext = iwch_alloc_ucontext, + .dealloc_ucontext = iwch_dealloc_ucontext, + .mmap = iwch_mmap, + .alloc_pd = iwch_allocate_pd, + .dealloc_pd = iwch_deallocate_pd, + .create_qp = iwch_create_qp, + .modify_qp = iwch_ib_modify_qp, + .destroy_qp = iwch_destroy_qp, + .create_cq = iwch_create_cq, + .destroy_cq = iwch_destroy_cq, + .resize_cq = iwch_resize_cq, + .poll_cq = iwch_poll_cq, + .get_dma_mr = iwch_get_dma_mr, + .reg_user_mr = iwch_reg_user_mr, + .dereg_mr = iwch_dereg_mr, + .alloc_mw = iwch_alloc_mw, + .dealloc_mw = iwch_dealloc_mw, + .alloc_mr = iwch_alloc_mr, + .map_mr_sg = iwch_map_mr_sg, + .req_notify_cq = iwch_arm_cq, + .post_send = iwch_post_send, + .post_recv = iwch_post_receive, + .alloc_hw_stats = iwch_alloc_stats, + .get_hw_stats = iwch_get_mib, + .get_port_immutable = iwch_port_immutable, + .get_dev_fw_str = get_dev_fw_ver_str, +}; + int iwch_register_device(struct iwch_dev *dev) { int ret; @@ -1401,6 +1434,7 @@ int iwch_register_device(struct iwch_dev *dev) sizeof(dev->ibdev.iwcm->ifname)); dev->ibdev.driver_id = RDMA_DRIVER_CXGB3; + ib_set_device_ops(&dev->ibdev, &iwch_dev_ops); ret = ib_register_device(&dev->ibdev, "cxgb3_%d", NULL); if (ret) goto bail1;