From patchwork Tue Oct 9 18:45:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10633177 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 92E80933 for ; Tue, 9 Oct 2018 18:47:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8933D294FA for ; Tue, 9 Oct 2018 18:47:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D6DB294F9; Tue, 9 Oct 2018 18:47:09 +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 24337294F9 for ; Tue, 9 Oct 2018 18:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727218AbeJJCF2 (ORCPT ); Tue, 9 Oct 2018 22:05:28 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34967 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbeJJCF2 (ORCPT ); Tue, 9 Oct 2018 22:05:28 -0400 Received: by mail-wm1-f67.google.com with SMTP id e187-v6so3125654wmf.0 for ; Tue, 09 Oct 2018 11:47:06 -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=sSYkuyo8gio+vQmhDl6DcBl7uYon+VFW6rLfvz0xVvI=; b=Cub5WKJ5M+Fuw9Y+Qn2SO1Ix1hK+hwMtd0qFaVZ7JeQqVhrcsOjMFQidgkcV4XYXJx XM6yRWCMe3EfeLmDBVjOJg0rFSZ1IjsCaDyavuE7vaf9Wi4a02bAEOhaBN+tdE4TMTAn DViDHkQIBsZnlj1XpHGJQPaZ6ctPWq7r3isMxanJYGVG8xY0ANOzxIW+Q2L9I5jR5e5u a/Z9zSUJdbko1V7fYp2AYBR26CG3DgwsEMlrrRI8TyDYjMu/nWR9eh+Wu6vyjQfhszZ3 S7UhN4ZD6mMs1P/ttgYXIH+eLc2d/0BovzywFCE2s8rEBMksDrmoKM5vD2cuYjtUOJE0 Pe+Q== 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=sSYkuyo8gio+vQmhDl6DcBl7uYon+VFW6rLfvz0xVvI=; b=Okeu3jJ0VDCZyENzWdFkW+hTn7jPTzRDPvPmv4LaIvfm1owWq4QPW4K98XOEWsvVQD c/5tDe40gxnNlKHkcl13Kdtw73qOs3cU4CRMEe2PGZOGN95ywA6MKDZ46wl1ajICqjNZ eEiOon8c0ziH9WiAQsCfc9Kqg3SmfkPJKpYLlAuV/vqt3iHe78EQUVKQ95cbfwqSPrRE IFKx6RWjxuv3G2i93At1r7/cpyJ23IfcmGUKNDdQUoRyVf9JA6Jp95W/XmOmbeHiUs2y 632YrEWgqKlscs7LdFeWzs88n+ngLqiVGxI5CePHFt87pvLbO1gRg2WZV1DhECbklO34 zIHg== X-Gm-Message-State: ABuFfojiFPppXU/36lJlAVK2XgHgFLpnphDaR5gyX5SMF6HxAw3qD+mE QKgTlATGTjGKwJMGhiYCKV8= X-Google-Smtp-Source: ACcGV600s4WKopyuFo6Ux3+9p8gRw5jQFqXvDZE5T6Lcf72rVNk6loACKtIZ41AyOyVIAho/5imtwA== X-Received: by 2002:a1c:5e49:: with SMTP id s70-v6mr2836812wmb.131.1539110825980; Tue, 09 Oct 2018 11:47:05 -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.47.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 11:47:05 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next 17/18] RDMA/rxe: Initialize ib_device_ops struct Date: Tue, 9 Oct 2018 21:45:46 +0300 Message-Id: <20181009184547.5907-18-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/sw/rxe/rxe_verbs.c | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index e4da5b671e4a..4f28f71b7746 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c @@ -1152,6 +1152,52 @@ static struct device_attribute *rxe_dev_attributes[] = { &dev_attr_parent, }; +static struct ib_device_ops rxe_dev_ops = { + .query_device = rxe_query_device, + .modify_device = rxe_modify_device, + .query_port = rxe_query_port, + .modify_port = rxe_modify_port, + .get_link_layer = rxe_get_link_layer, + .get_netdev = rxe_get_netdev, + .query_pkey = rxe_query_pkey, + .alloc_ucontext = rxe_alloc_ucontext, + .dealloc_ucontext = rxe_dealloc_ucontext, + .mmap = rxe_mmap, + .get_port_immutable = rxe_port_immutable, + .alloc_pd = rxe_alloc_pd, + .dealloc_pd = rxe_dealloc_pd, + .create_ah = rxe_create_ah, + .modify_ah = rxe_modify_ah, + .query_ah = rxe_query_ah, + .destroy_ah = rxe_destroy_ah, + .create_srq = rxe_create_srq, + .modify_srq = rxe_modify_srq, + .query_srq = rxe_query_srq, + .destroy_srq = rxe_destroy_srq, + .post_srq_recv = rxe_post_srq_recv, + .create_qp = rxe_create_qp, + .modify_qp = rxe_modify_qp, + .query_qp = rxe_query_qp, + .destroy_qp = rxe_destroy_qp, + .post_send = rxe_post_send, + .post_recv = rxe_post_recv, + .create_cq = rxe_create_cq, + .destroy_cq = rxe_destroy_cq, + .resize_cq = rxe_resize_cq, + .poll_cq = rxe_poll_cq, + .peek_cq = rxe_peek_cq, + .req_notify_cq = rxe_req_notify_cq, + .get_dma_mr = rxe_get_dma_mr, + .reg_user_mr = rxe_reg_user_mr, + .dereg_mr = rxe_dereg_mr, + .alloc_mr = rxe_alloc_mr, + .map_mr_sg = rxe_map_mr_sg, + .attach_mcast = rxe_attach_mcast, + .detach_mcast = rxe_detach_mcast, + .get_hw_stats = rxe_ib_get_hw_stats, + .alloc_hw_stats = rxe_ib_alloc_hw_stats, +}; + int rxe_register_device(struct rxe_dev *rxe) { int err; @@ -1251,6 +1297,8 @@ int rxe_register_device(struct rxe_dev *rxe) dev->get_hw_stats = rxe_ib_get_hw_stats; dev->alloc_hw_stats = rxe_ib_alloc_hw_stats; + ib_set_device_ops(dev, &rxe_dev_ops); + tfm = crypto_alloc_shash("crc32", 0, 0); if (IS_ERR(tfm)) { pr_err("failed to allocate crc algorithm err:%ld\n",