From patchwork Tue Oct 9 18:45:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10633157 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 29621933 for ; Tue, 9 Oct 2018 18:46:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F7F0294F9 for ; Tue, 9 Oct 2018 18:46:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14077294FD; Tue, 9 Oct 2018 18:46:58 +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 B561E294F9 for ; Tue, 9 Oct 2018 18:46:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbeJJCFR (ORCPT ); Tue, 9 Oct 2018 22:05:17 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54522 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727336AbeJJCFQ (ORCPT ); Tue, 9 Oct 2018 22:05:16 -0400 Received: by mail-wm1-f66.google.com with SMTP id r63-v6so2910188wma.4 for ; Tue, 09 Oct 2018 11:46:55 -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=Cgo6W5LLK8DAL+ka1bJJ+ignQc3ApF0Mp3rq1Md7AUU=; b=XKzPTqx78X+mUADrnup2jdVXvXsVjkfUXRLnAq7PuuOPFKx4zr/qzr06jr9ARINa6r wOejPLQG3/BkVpYbSRtEOzFaSeB0nPFJ9rrqEtaYRvIrZkiwI9WB8Uu5rfb3sJNs2pZG i8Rynl+eg6YxXsZIKTlNzpKeG7izyxUZ2KePKU1lF2vTgag/BdfwNyI+znK+P/sNCygn RiMWMp5ixkhREn5oAbgXXVpbVRtMfyhuTUe7R/A9S72ltRvWcF+mlHu9EmiedIlgB21f /9m944k67i5tVjZ/fno1+3zfYW4dxRqcQmbwKEF8QUkY8x2Ljk5x/xbesYdkbRiDI4pH 1Vrw== 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=Cgo6W5LLK8DAL+ka1bJJ+ignQc3ApF0Mp3rq1Md7AUU=; b=p/9NzLcBDZZMFrxVA7Prv0Ciu9El+u9/qFKei0V+5HHtW6uorayS6I9YasjDulQciR and/oW7XFNq6QnLA53/pi5YrZ7LlYVQRULqPpIDBbqvZ3l2XrIGQCl/URTBP8IYlJLst Fs3j6bnKC7CO3tcJoBK/esQgmJjWcHoVR1oHoeMJe1bYV2p8YQUS5TkgC30OZM/hKjIm DxOn3HMLZCC4ue3YNP6WXwQ85X+Jl8VacIkx+AN1BHKM45KYro3K3DVCt16fu+WY3DCj LnuJxCLqKo58d5Q4ABR4M0JXXkmW4yjpTUGjWc+3TBNuSSwii0Jdwe8OrJaPZmnyQd8p xDNQ== X-Gm-Message-State: ABuFfogHMr2iAO0lLkch5Dbg17EMGNEW+t2Q8QNqZDkI+Y7HdqBhnbOz ofTlb+X0HQqlAwBBk78hGMc= X-Google-Smtp-Source: ACcGV60mBXH+vlpfCe30jyOrRLBaq/0UbJ3FYGVUXqiluH5YzMNUsxXzvCRKkZOtYn6LKOPTgD6U5A== X-Received: by 2002:a1c:c683:: with SMTP id w125-v6mr2835067wmf.117.1539110814244; Tue, 09 Oct 2018 11:46:54 -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.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 11:46:53 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next 07/18] RDMA/i40iw: Initialize ib_device_ops struct Date: Tue, 9 Oct 2018 21:45:36 +0300 Message-Id: <20181009184547.5907-8-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/i40iw/i40iw_verbs.c | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index cb2aef874ca8..7841e609d81a 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -2737,6 +2737,40 @@ static const struct cpumask *i40iw_get_vector_affinity(struct ib_device *ibdev, return irq_get_affinity_mask(msix_vec->irq); } +static struct ib_device_ops i40iw_dev_ops = { + .query_port = i40iw_query_port, + .query_pkey = i40iw_query_pkey, + .query_gid = i40iw_query_gid, + .alloc_ucontext = i40iw_alloc_ucontext, + .dealloc_ucontext = i40iw_dealloc_ucontext, + .mmap = i40iw_mmap, + .alloc_pd = i40iw_alloc_pd, + .dealloc_pd = i40iw_dealloc_pd, + .create_qp = i40iw_create_qp, + .modify_qp = i40iw_modify_qp, + .query_qp = i40iw_query_qp, + .destroy_qp = i40iw_destroy_qp, + .create_cq = i40iw_create_cq, + .destroy_cq = i40iw_destroy_cq, + .get_dma_mr = i40iw_get_dma_mr, + .reg_user_mr = i40iw_reg_user_mr, + .dereg_mr = i40iw_dereg_mr, + .alloc_hw_stats = i40iw_alloc_hw_stats, + .get_hw_stats = i40iw_get_hw_stats, + .query_device = i40iw_query_device, + .drain_sq = i40iw_drain_sq, + .drain_rq = i40iw_drain_rq, + .alloc_mr = i40iw_alloc_mr, + .map_mr_sg = i40iw_map_mr_sg, + .get_port_immutable = i40iw_port_immutable, + .get_dev_fw_str = i40iw_get_dev_fw_str, + .poll_cq = i40iw_poll_cq, + .req_notify_cq = i40iw_req_notify_cq, + .post_send = i40iw_post_send, + .post_recv = i40iw_post_recv, + .get_vector_affinity = i40iw_get_vector_affinity, +}; + /** * i40iw_init_rdma_device - initialization of iwarp device * @iwdev: iwarp device @@ -2830,6 +2864,7 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev iwibdev->ibdev.post_send = i40iw_post_send; iwibdev->ibdev.post_recv = i40iw_post_recv; iwibdev->ibdev.get_vector_affinity = i40iw_get_vector_affinity; + ib_set_device_ops(&iwibdev->ibdev, &i40iw_dev_ops); return iwibdev; }