From patchwork Tue Oct 9 18:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10633165 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 C77A3933 for ; Tue, 9 Oct 2018 18:47:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCFEE294F9 for ; Tue, 9 Oct 2018 18:47:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B116E294FD; Tue, 9 Oct 2018 18:47:02 +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 59B8C294F9 for ; Tue, 9 Oct 2018 18:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727278AbeJJCFV (ORCPT ); Tue, 9 Oct 2018 22:05:21 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53190 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbeJJCFV (ORCPT ); Tue, 9 Oct 2018 22:05:21 -0400 Received: by mail-wm1-f65.google.com with SMTP id 189-v6so2907360wmw.2 for ; Tue, 09 Oct 2018 11:46:59 -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=ThxpkFr5W2WJ2iDMVrdBG6oQOM/x+o0DS/Pp9OUXHYU=; b=ri8OQ5N9MJspsFh0hVj0tIuSEi4+aKS4oP8LbvT27aIfagRQWtgwjf9reN/farINku BjDTMyUTVIJ7U4o76UIcrue+OnRryWu5cMfhhyhUdioCrdby0qpNkv0qCOCORTwIOMcC mXkm4BLv9uPNNOyCZp9qwU5Fd7ywX+7U4L7+ef3SdQmbd/x7Q8X2GgHO1oVvxhTmaM8t mWJ/qqy8sBOMrw8GnUeHVN7VqxOrEAibYptP2DISQu4K9DlhQwaR8N9LbHFlyyCQU4pb RVW20LEm9+SyejBOMrGAZSkEhOofIY9kFdoQE+J1O6sCPM5ybmvS2XSDpENpmJ1oJfOa oCsg== 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=ThxpkFr5W2WJ2iDMVrdBG6oQOM/x+o0DS/Pp9OUXHYU=; b=t2CUDa+ZYurZzBO4e8k4GVt6ToDNy++zt94oTWGbwNyAHPi3VsvFcWRf21DVT+cPAN RFiR/HZ3PhmSmN7DR5fItULZG7dPk5nAFE4XkGWIA/wE0rsGhcdfMPxiZfI9ap7H5OaF Ngmf4gh20MewF52Dc5XpZa1IdM0f9BXHho3oMANJv5zJ5hBfarHUkR+XqyXEwzaTg63d sAGfy2q8HFuhU3TGJkp/+Yx5clHAABJmiHQ+8+E9KXQeG95FElLTO3ZY9gTxtCNi4eH+ e4vfKUE1pWZJoeXTzFoCivIkVzzLqkY1PVonCSAIX9GNJ5S8sRycKqjBS4cZFC9pgGsh NQcw== X-Gm-Message-State: ABuFfoiRVoppZ1aMWDG3Y/+rMLcvObGV9j9CWeN3VYlK9QLucbXlpuUM FdtHRLONLW9//SqiRC5N01y3Bn0t X-Google-Smtp-Source: ACcGV61bpBMTJcO7z3ID6bkheTqi/9lqT2zmoBlGLyrlmLkyHlxpPxqVZeOi0PpLZCJrorImJzNjKQ== X-Received: by 2002:a1c:ac82:: with SMTP id v124-v6mr2947701wme.10.1539110819023; Tue, 09 Oct 2018 11:46:59 -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.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 11:46:58 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next 11/18] RDMA/nes: Initialize ib_device_ops struct Date: Tue, 9 Oct 2018 21:45:40 +0300 Message-Id: <20181009184547.5907-12-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/nes/nes_verbs.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 94054bc611bd..a305bb8115e9 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -3627,6 +3627,39 @@ static void get_dev_fw_str(struct ib_device *dev, char *str) (nesvnic->nesdev->nesadapter->firmware_version & 0x000000ff)); } +static struct ib_device_ops nes_dev_ops = { + .query_device = nes_query_device, + .query_port = nes_query_port, + .query_pkey = nes_query_pkey, + .query_gid = nes_query_gid, + .alloc_ucontext = nes_alloc_ucontext, + .dealloc_ucontext = nes_dealloc_ucontext, + .mmap = nes_mmap, + .alloc_pd = nes_alloc_pd, + .dealloc_pd = nes_dealloc_pd, + .create_qp = nes_create_qp, + .modify_qp = nes_modify_qp, + .query_qp = nes_query_qp, + .destroy_qp = nes_destroy_qp, + .create_cq = nes_create_cq, + .destroy_cq = nes_destroy_cq, + .poll_cq = nes_poll_cq, + .get_dma_mr = nes_get_dma_mr, + .reg_user_mr = nes_reg_user_mr, + .dereg_mr = nes_dereg_mr, + .alloc_mw = nes_alloc_mw, + .dealloc_mw = nes_dealloc_mw, + .alloc_mr = nes_alloc_mr, + .map_mr_sg = nes_map_mr_sg, + .req_notify_cq = nes_req_notify_cq, + .post_send = nes_post_send, + .post_recv = nes_post_recv, + .drain_sq = nes_drain_sq, + .drain_rq = nes_drain_rq, + .get_port_immutable = nes_port_immutable, + .get_dev_fw_str = get_dev_fw_str, +}; + /** * nes_init_ofa_device */ @@ -3719,6 +3752,7 @@ struct nes_ib_device *nes_init_ofa_device(struct net_device *netdev) nesibdev->ibdev.iwcm->destroy_listen = nes_destroy_listen; nesibdev->ibdev.get_port_immutable = nes_port_immutable; nesibdev->ibdev.get_dev_fw_str = get_dev_fw_str; + ib_set_device_ops(&nesibdev->ibdev, &nes_dev_ops); memcpy(nesibdev->ibdev.iwcm->ifname, netdev->name, sizeof(nesibdev->ibdev.iwcm->ifname));