From patchwork Wed Jul 25 20:10:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10544631 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 49C82157A for ; Wed, 25 Jul 2018 20:11:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 341DB2AB46 for ; Wed, 25 Jul 2018 20:11:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3281A2ABA6; Wed, 25 Jul 2018 20:11:13 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 8B5982ABA4 for ; Wed, 25 Jul 2018 20:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729529AbeGYVYZ (ORCPT ); Wed, 25 Jul 2018 17:24:25 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41855 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730219AbeGYVYZ (ORCPT ); Wed, 25 Jul 2018 17:24:25 -0400 Received: by mail-wr1-f68.google.com with SMTP id j5-v6so8517296wrr.8 for ; Wed, 25 Jul 2018 13:11:10 -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=r4OENs9TJdePAcbcVfG38VBRM1NVwlglkJe5bCoUkBc=; b=sJciSQ5l0r1bF5visQ0AxSqM3Dfbu1M9dNMn2+TIsY53g556OfQFcQ7XBRnwybHMaO BqBNbvMsCcASanKRtLl7fZRKd+P4sW++I7HCloHOQiMNZs12mj68tNX6lMtTp6fUg8+A NtHjM3dG0N2zQBqTIBi+VILPPRjfygblGOu2YNbByGf76FB0Wly2hY4YEJJkLYCFy1pN qDucNjN+13BIdaf7ZSGMJC/uQyVE+NxZAADz/qDUzBpZ2FJRy9EFyST2yF0NJaONyPsd b3K5/1Wy9N22o3y8n6yuwF+9sFrc4yDKmQz68oJVDjnvlO9Hlu+y1eBxyL60j8zXj54H KrQg== 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=r4OENs9TJdePAcbcVfG38VBRM1NVwlglkJe5bCoUkBc=; b=hxkmZbHUdyv7FbCSkrSOSBFGJ2hOpBomgO2CZRw2pH2UvFd7OTwSkcYD1Yf8c8vh2m Wmlkl+TZBn51ydNh7Ymx+3k80FGPlzd4qlqxSBTsnMXGniEJG2PdY5QA2dZ+4SUM89RN IFhNd6skbxyWkPJwB1635sgUM+LljZpTn9PyMzjMDe8dCN41dlTzWI6fh01GzZj7eV7p yR+2KneYTRj8007Lslc3XpTFPXkjPnETPsYb2q2VAcXkNsP5I+Pd80o5eLC5oCjyy7PE LnLjvyZBMhhfG4DxI5F+esGOGRAI9YeCUJyzxTh7f/wbES0VF7Lb4jpAPG39ImgBUzYM H29A== X-Gm-Message-State: AOUpUlFPfvkRHWR5Z5kHVG3H5FNqSg1Vwn28AvV56vS4eBs6Gfgh3SZE CPztVbDzt9VeUbP+fNewbtZrx1D4 X-Google-Smtp-Source: AAOMgpcf9bb6uvEgTPCdaerkNiZFn08tMmMuhQP6BE+XvJeWIqp38rEq37zhPWs/YImZTQ1SRNRujQ== X-Received: by 2002:adf:f64c:: with SMTP id x12-v6mr14543881wrp.97.1532549470184; Wed, 25 Jul 2018 13:11:10 -0700 (PDT) Received: from localhost.localdomain (bzq-109-64-56-95.red.bezeqint.net. [109.64.56.95]) by smtp.gmail.com with ESMTPSA id d26-v6sm3708629wmb.15.2018.07.25.13.11.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 13:11:09 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky , Shiraz Saleem Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next v3 1/3] RDMA/core: Remove mandatory verbs check Date: Wed, 25 Jul 2018 23:10:43 +0300 Message-Id: <20180725201045.26995-2-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180725201045.26995-1-kamalheib1@gmail.com> References: <20180725201045.26995-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 Removing the check for mandatory verbs because not all providers are implementing them. Signed-off-by: Kamal Heib --- drivers/infiniband/core/device.c | 45 ---------------------------------------- 1 file changed, 45 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index b8144f194777..c6fd0ec344b7 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -93,46 +93,6 @@ static struct notifier_block ibdev_lsm_nb = { .notifier_call = ib_security_change, }; -static int ib_device_check_mandatory(struct ib_device *device) -{ -#define IB_MANDATORY_FUNC(x) { offsetof(struct ib_device, x), #x } - static const struct { - size_t offset; - char *name; - } mandatory_table[] = { - IB_MANDATORY_FUNC(query_device), - IB_MANDATORY_FUNC(query_port), - IB_MANDATORY_FUNC(query_pkey), - IB_MANDATORY_FUNC(alloc_pd), - IB_MANDATORY_FUNC(dealloc_pd), - IB_MANDATORY_FUNC(create_ah), - IB_MANDATORY_FUNC(destroy_ah), - IB_MANDATORY_FUNC(create_qp), - IB_MANDATORY_FUNC(modify_qp), - IB_MANDATORY_FUNC(destroy_qp), - IB_MANDATORY_FUNC(post_send), - IB_MANDATORY_FUNC(post_recv), - IB_MANDATORY_FUNC(create_cq), - IB_MANDATORY_FUNC(destroy_cq), - IB_MANDATORY_FUNC(poll_cq), - IB_MANDATORY_FUNC(req_notify_cq), - IB_MANDATORY_FUNC(get_dma_mr), - IB_MANDATORY_FUNC(dereg_mr), - IB_MANDATORY_FUNC(get_port_immutable) - }; - int i; - - for (i = 0; i < ARRAY_SIZE(mandatory_table); ++i) { - if (!*(void **) ((void *) device + mandatory_table[i].offset)) { - pr_warn("Device %s is missing mandatory function %s\n", - device->name, mandatory_table[i].name); - return -EINVAL; - } - } - - return 0; -} - static struct ib_device *__ib_device_get_by_index(u32 index) { struct ib_device *device; @@ -502,11 +462,6 @@ int ib_register_device(struct ib_device *device, goto out; } - if (ib_device_check_mandatory(device)) { - ret = -EINVAL; - goto out; - } - ret = read_port_immutable(device); if (ret) { pr_warn("Couldn't create per port immutable data %s\n", From patchwork Wed Jul 25 20:10:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10544633 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 8243114E2 for ; Wed, 25 Jul 2018 20:11:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71A342AB83 for ; Wed, 25 Jul 2018 20:11:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65BFD2ABA0; Wed, 25 Jul 2018 20:11:15 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 124D42AB83 for ; Wed, 25 Jul 2018 20:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730370AbeGYVY2 (ORCPT ); Wed, 25 Jul 2018 17:24:28 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34547 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730357AbeGYVY2 (ORCPT ); Wed, 25 Jul 2018 17:24:28 -0400 Received: by mail-wr1-f68.google.com with SMTP id c13-v6so8550241wrt.1 for ; Wed, 25 Jul 2018 13:11:13 -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=LZuIWOkIYZIgXw6a1GT1q2yvb53ph+oeAcIr6xk7oO8=; b=gcz+syV/e+FoWG2ZnmMPlauo0XMdLqPC2n5kT7CLlbE+uFItVvL54QIzCNp4pqv5LW sb+WwOmkShBU4umRUC4uEWylDpSsIjzCzI71Q10/mWNV13Z1uOjKJNlHfZG2CQG4UgSd 21Cjl8W7dGlYvtOIfhtvVwj2XtgLy+7ZPuU+jMklK5VDqo1FYMaUYsIg+ahKHDgDLm3o dRM9BUljl8fs+shxUiDO41F/wxxgw5/xQQTGS2fGcTPJLsy8BeIRr8GFpdRjimOtu8iu 2uh5NL8AI7wV+X4clFAx5i4UtZWm23ulBdmmMSJBioddNhJuIzayS9cRGDLJC+jbZFdJ q1Iw== 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=LZuIWOkIYZIgXw6a1GT1q2yvb53ph+oeAcIr6xk7oO8=; b=r3DoxPSo4qlpkJ0pWsT0N3rmf7/d9l/I7B6CXLlZQr9IhHPrZw69rviarXQ/SXGNc/ iDbkyT41QcD3uBgSkknc1V4vVFk8CUod0hTQIl4Qy+LXt2y3gd9fuOQG2lGmhQ820EiC bem7sNOIQArcvbXf7LgeZNnlZpge0SrfA7e5PWUQYxhX3zbQTNBInvtrAmHNYqUlAoRM IWjKYxx1DLsuBU78ZmqS6GOLRF7dbbaw0TmOmf7Z1sUxZccf7vl6bohGapdGqGEH4mGO PiwFyvBiyOOynbC7TEW2Su3ci7I6YxeKGOdDp7MvkHazVC8YXeOvUDYQesG/wSq5yrtH VTBA== X-Gm-Message-State: AOUpUlGPj9fjxUXC0ta+cVdpDBagnd1YaqA9iZyj1rqxQFa3ah7LFDmH +r3BGglvUB2LL5EB6Ex//uI= X-Google-Smtp-Source: AAOMgpcG8P/67WVc7uHfRrqcwjjwnqncRO2K9rHUcsJGmW5hHdQc0ZpHK5kULUeFXj2qDiSpD5G+Dw== X-Received: by 2002:adf:8062:: with SMTP id 89-v6mr14488477wrk.221.1532549471553; Wed, 25 Jul 2018 13:11:11 -0700 (PDT) Received: from localhost.localdomain (bzq-109-64-56-95.red.bezeqint.net. [109.64.56.95]) by smtp.gmail.com with ESMTPSA id d26-v6sm3708629wmb.15.2018.07.25.13.11.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 13:11:11 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky , Shiraz Saleem Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next v3 2/3] RDMA/core: Check for verbs callbacks before using them Date: Wed, 25 Jul 2018 23:10:44 +0300 Message-Id: <20180725201045.26995-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180725201045.26995-1-kamalheib1@gmail.com> References: <20180725201045.26995-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 Make sure the providers implement the verbs callbacks before calling them, otherwise return -EOPNOTSUPP. Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky --- drivers/infiniband/core/uverbs_cmd.c | 3 ++- drivers/infiniband/core/verbs.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 987ee38ab4b3..c3661ba8a28e 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -2507,7 +2507,8 @@ ssize_t ib_uverbs_post_srq_recv(struct ib_uverbs_file *file, goto out; resp.bad_wr = 0; - ret = srq->device->post_srq_recv(srq, wr, &bad_wr); + ret = srq->device->post_srq_recv ? + srq->device->post_srq_recv(srq, wr, &bad_wr) : -EOPNOTSUPP; uobj_put_obj_read(srq); diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index b6ceb6fd6a67..9daae59572ac 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -479,6 +479,9 @@ static struct ib_ah *_rdma_create_ah(struct ib_pd *pd, { struct ib_ah *ah; + if (!pd->device->create_ah) + return ERR_PTR(-EOPNOTSUPP); + ah = pd->device->create_ah(pd, ah_attr, udata); if (!IS_ERR(ah)) { From patchwork Wed Jul 25 20:10:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10544635 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 7E60114E2 for ; Wed, 25 Jul 2018 20:11:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E5BC2AB44 for ; Wed, 25 Jul 2018 20:11:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C77E2ABAD; Wed, 25 Jul 2018 20:11:19 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 387752AB7B for ; Wed, 25 Jul 2018 20:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730400AbeGYVYb (ORCPT ); Wed, 25 Jul 2018 17:24:31 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:50441 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730219AbeGYVYb (ORCPT ); Wed, 25 Jul 2018 17:24:31 -0400 Received: by mail-wm0-f67.google.com with SMTP id s12-v6so3960322wmc.0 for ; Wed, 25 Jul 2018 13:11:14 -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=E7t8g6zrIGe88ZQ7l6mDAG3+W72aRg6WzNLcg53vi5I=; b=NUDSDUseoUwgZvZuvvWLGgKPDhP8GTAhB/yvtNgLIu1SplcWgodOgcbDIabmq/8DUz CoaESLGW7SDLs0UXrdT+DTI60XZVxS9oTgcsvTnE0Z6iLJxvHQNFTbFNrWtEZS2Xtc8P jbsccKA19KF3v4swCa4gUtFZ1EuzS7tRFXFdwkF4DP9GLYd0vRjp29MinwdGQgIzvKx0 3/4MIL0/sZs57yBfm/S4F16lIwBFKuwBsp48C1BgnRdI44HJFsVUx7TCx0FnvcnRU10X SS6mmhDlnX4ZoytOhCuERYKEBxDqMrhjEKSOM4gs2N9RF/+AysE1h/A/0AaX5ewkslBV SHUQ== 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=E7t8g6zrIGe88ZQ7l6mDAG3+W72aRg6WzNLcg53vi5I=; b=KeTR/SLUtQfG9bHcv/m7+WIt9QODlMtOVA+qPK54OOtyGRlFy3zOtyltXeMJJj0GpG ar2A3lmwPkNl/mZirW6d/0wOAbbW05QniYUlpGnbSxLQnq9VdxBs5a86cvoUM9SGAZpa 1CFE0n1Ywxi7eiX59Xz3qcXG3Sge04ZTOSUYlUy4I/zO2SEoaVPMK4qErymVSu8adSoa RQ9hAcLaaC6xkpT+75Rbl+vCRV8NyJKaxNKeu/BEE4aCmfigg5yagvNGSK7nYKyTnXmF UZub7gS9SoY5PDViifRCcMMIIfISWeWYMjVZuudHpqep2n1BbVVyExkFIanHBsr4l/no h8Sw== X-Gm-Message-State: AOUpUlFnnYwft+H46A++CLtnMc/nqFAJshasz0q4F2IiskeU9/O9y2aP Eyi+4aSCoNkhiJltFEgYWsA= X-Google-Smtp-Source: AAOMgpfieUoywcpAGm1mEfTFH9+J93tIINlg1RZrXxunqbXOv8GIgmsAQJN8uSUV6Wtc5sEfcffdsA== X-Received: by 2002:a1c:f30d:: with SMTP id q13-v6mr5331539wmq.36.1532549473255; Wed, 25 Jul 2018 13:11:13 -0700 (PDT) Received: from localhost.localdomain (bzq-109-64-56-95.red.bezeqint.net. [109.64.56.95]) by smtp.gmail.com with ESMTPSA id d26-v6sm3708629wmb.15.2018.07.25.13.11.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 13:11:12 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky , Shiraz Saleem Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next v3 3/3] RDMA/providers: Remove pointless functions Date: Wed, 25 Jul 2018 23:10:45 +0300 Message-Id: <20180725201045.26995-4-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180725201045.26995-1-kamalheib1@gmail.com> References: <20180725201045.26995-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 The rdma core is taking care of return the right error code when the rdma device callbacks aren't supported. Signed-off-by: Kamal Heib Acked-by: Shiraz Saleem --- drivers/infiniband/hw/cxgb3/iwch_provider.c | 41 ----------------- drivers/infiniband/hw/cxgb4/cq.c | 5 --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 - drivers/infiniband/hw/cxgb4/provider.c | 41 ----------------- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 40 ----------------- drivers/infiniband/hw/nes/nes_verbs.c | 60 ------------------------- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 6 --- drivers/infiniband/hw/ocrdma/ocrdma_ah.h | 1 - drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 - drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 26 ----------- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 3 -- drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 7 --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 7 --- 13 files changed, 239 deletions(-) diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 68bc2f9a532f..1b9ff21aa1d5 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c @@ -61,42 +61,6 @@ #include #include "common.h" -static struct ib_ah *iwch_ah_create(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr, - struct ib_udata *udata) -{ - return ERR_PTR(-ENOSYS); -} - -static int iwch_ah_destroy(struct ib_ah *ah) -{ - return -ENOSYS; -} - -static int iwch_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) -{ - return -ENOSYS; -} - -static int iwch_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) -{ - return -ENOSYS; -} - -static int iwch_process_mad(struct ib_device *ibdev, - int mad_flags, - u8 port_num, - const struct ib_wc *in_wc, - const struct ib_grh *in_grh, - const struct ib_mad_hdr *in_mad, - size_t in_mad_size, - struct ib_mad_hdr *out_mad, - size_t *out_mad_size, - u16 *out_mad_pkey_index) -{ - return -ENOSYS; -} - static int iwch_dealloc_ucontext(struct ib_ucontext *context) { struct iwch_dev *rhp = to_iwch_dev(context->device); @@ -1399,8 +1363,6 @@ int iwch_register_device(struct iwch_dev *dev) dev->ibdev.mmap = iwch_mmap; dev->ibdev.alloc_pd = iwch_allocate_pd; dev->ibdev.dealloc_pd = iwch_deallocate_pd; - dev->ibdev.create_ah = iwch_ah_create; - dev->ibdev.destroy_ah = iwch_ah_destroy; dev->ibdev.create_qp = iwch_create_qp; dev->ibdev.modify_qp = iwch_ib_modify_qp; dev->ibdev.destroy_qp = iwch_destroy_qp; @@ -1415,9 +1377,6 @@ int iwch_register_device(struct iwch_dev *dev) dev->ibdev.dealloc_mw = iwch_dealloc_mw; dev->ibdev.alloc_mr = iwch_alloc_mr; dev->ibdev.map_mr_sg = iwch_map_mr_sg; - dev->ibdev.attach_mcast = iwch_multicast_attach; - dev->ibdev.detach_mcast = iwch_multicast_detach; - dev->ibdev.process_mad = iwch_process_mad; dev->ibdev.req_notify_cq = iwch_arm_cq; dev->ibdev.post_send = iwch_post_send; dev->ibdev.post_recv = iwch_post_receive; diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index a055f9f08e76..1bed1a8484b0 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c @@ -1058,11 +1058,6 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, return ERR_PTR(ret); } -int c4iw_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata) -{ - return -ENOSYS; -} - int c4iw_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) { struct c4iw_cq *chp; diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index 8866bf992316..032cb61b7d5b 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h @@ -1038,7 +1038,6 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, const struct ib_cq_init_attr *attr, struct ib_ucontext *ib_context, struct ib_udata *udata); -int c4iw_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata); int c4iw_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags); int c4iw_destroy_qp(struct ib_qp *ib_qp); struct ib_qp *c4iw_create_qp(struct ib_pd *pd, diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c index 61b8bdb9423d..63babdcb8198 100644 --- a/drivers/infiniband/hw/cxgb4/provider.c +++ b/drivers/infiniband/hw/cxgb4/provider.c @@ -58,41 +58,6 @@ static int fastreg_support = 1; module_param(fastreg_support, int, 0644); MODULE_PARM_DESC(fastreg_support, "Advertise fastreg support (default=1)"); -static struct ib_ah *c4iw_ah_create(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr, - struct ib_udata *udata) - -{ - return ERR_PTR(-ENOSYS); -} - -static int c4iw_ah_destroy(struct ib_ah *ah) -{ - return -ENOSYS; -} - -static int c4iw_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) -{ - return -ENOSYS; -} - -static int c4iw_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) -{ - return -ENOSYS; -} - -static int c4iw_process_mad(struct ib_device *ibdev, int mad_flags, - u8 port_num, const struct ib_wc *in_wc, - const struct ib_grh *in_grh, - const struct ib_mad_hdr *in_mad, - size_t in_mad_size, - struct ib_mad_hdr *out_mad, - size_t *out_mad_size, - u16 *out_mad_pkey_index) -{ - return -ENOSYS; -} - void _c4iw_free_ucontext(struct kref *kref) { struct c4iw_ucontext *ucontext; @@ -609,15 +574,12 @@ void c4iw_register_device(struct work_struct *work) dev->ibdev.mmap = c4iw_mmap; dev->ibdev.alloc_pd = c4iw_allocate_pd; dev->ibdev.dealloc_pd = c4iw_deallocate_pd; - dev->ibdev.create_ah = c4iw_ah_create; - dev->ibdev.destroy_ah = c4iw_ah_destroy; dev->ibdev.create_qp = c4iw_create_qp; dev->ibdev.modify_qp = c4iw_ib_modify_qp; dev->ibdev.query_qp = c4iw_ib_query_qp; dev->ibdev.destroy_qp = c4iw_destroy_qp; dev->ibdev.create_cq = c4iw_create_cq; dev->ibdev.destroy_cq = c4iw_destroy_cq; - dev->ibdev.resize_cq = c4iw_resize_cq; dev->ibdev.poll_cq = c4iw_poll_cq; dev->ibdev.get_dma_mr = c4iw_get_dma_mr; dev->ibdev.reg_user_mr = c4iw_reg_user_mr; @@ -626,9 +588,6 @@ void c4iw_register_device(struct work_struct *work) dev->ibdev.dealloc_mw = c4iw_dealloc_mw; dev->ibdev.alloc_mr = c4iw_alloc_mr; dev->ibdev.map_mr_sg = c4iw_map_mr_sg; - dev->ibdev.attach_mcast = c4iw_multicast_attach; - dev->ibdev.detach_mcast = c4iw_multicast_detach; - dev->ibdev.process_mad = c4iw_process_mad; dev->ibdev.req_notify_cq = c4iw_arm_cq; dev->ibdev.post_send = c4iw_post_send; dev->ibdev.post_recv = c4iw_post_receive; diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index 7d85414742ff..b4c25578dc43 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -2703,21 +2703,6 @@ static int i40iw_query_gid(struct ib_device *ibdev, return 0; } -/** - * i40iw_modify_port Modify port properties - * @ibdev: device pointer from stack - * @port: port number - * @port_modify_mask: mask for port modifications - * @props: port properties - */ -static int i40iw_modify_port(struct ib_device *ibdev, - u8 port, - int port_modify_mask, - struct ib_port_modify *props) -{ - return -ENOSYS; -} - /** * i40iw_query_pkey - Query partition key * @ibdev: device pointer from stack @@ -2734,28 +2719,6 @@ static int i40iw_query_pkey(struct ib_device *ibdev, return 0; } -/** - * i40iw_create_ah - create address handle - * @ibpd: ptr of pd - * @ah_attr: address handle attributes - */ -static struct ib_ah *i40iw_create_ah(struct ib_pd *ibpd, - struct rdma_ah_attr *attr, - struct ib_udata *udata) - -{ - return ERR_PTR(-ENOSYS); -} - -/** - * i40iw_destroy_ah - Destroy address handle - * @ah: pointer to address handle - */ -static int i40iw_destroy_ah(struct ib_ah *ah) -{ - return -ENOSYS; -} - /** * i40iw_get_vector_affinity - report IRQ affinity mask * @ibdev: IB device @@ -2823,7 +2786,6 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev iwibdev->ibdev.num_comp_vectors = iwdev->ceqs_count; iwibdev->ibdev.dev.parent = &pcidev->dev; iwibdev->ibdev.query_port = i40iw_query_port; - iwibdev->ibdev.modify_port = i40iw_modify_port; iwibdev->ibdev.query_pkey = i40iw_query_pkey; iwibdev->ibdev.query_gid = i40iw_query_gid; iwibdev->ibdev.alloc_ucontext = i40iw_alloc_ucontext; @@ -2843,8 +2805,6 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev iwibdev->ibdev.alloc_hw_stats = i40iw_alloc_hw_stats; iwibdev->ibdev.get_hw_stats = i40iw_get_hw_stats; iwibdev->ibdev.query_device = i40iw_query_device; - iwibdev->ibdev.create_ah = i40iw_create_ah; - iwibdev->ibdev.destroy_ah = i40iw_destroy_ah; iwibdev->ibdev.drain_sq = i40iw_drain_sq; iwibdev->ibdev.drain_rq = i40iw_drain_rq; iwibdev->ibdev.alloc_mr = i40iw_alloc_mr; diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 82b8f9630ee8..9d0ca86db110 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -754,26 +754,6 @@ static int nes_dealloc_pd(struct ib_pd *ibpd) } -/** - * nes_create_ah - */ -static struct ib_ah *nes_create_ah(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr, - struct ib_udata *udata) -{ - return ERR_PTR(-ENOSYS); -} - - -/** - * nes_destroy_ah - */ -static int nes_destroy_ah(struct ib_ah *ah) -{ - return -ENOSYS; -} - - /** * nes_get_encoded_size */ @@ -3005,40 +2985,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, return err; } - -/** - * nes_muticast_attach - */ -static int nes_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) -{ - nes_debug(NES_DBG_INIT, "\n"); - return -ENOSYS; -} - - -/** - * nes_multicast_detach - */ -static int nes_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) -{ - nes_debug(NES_DBG_INIT, "\n"); - return -ENOSYS; -} - - -/** - * nes_process_mad - */ -static int nes_process_mad(struct ib_device *ibdev, int mad_flags, - u8 port_num, const struct ib_wc *in_wc, const struct ib_grh *in_grh, - const struct ib_mad_hdr *in, size_t in_mad_size, - struct ib_mad_hdr *out, size_t *out_mad_size, - u16 *out_mad_pkey_index) -{ - nes_debug(NES_DBG_INIT, "\n"); - return -ENOSYS; -} - static inline void fill_wqe_sg_send(struct nes_hw_qp_wqe *wqe, struct ib_send_wr *ib_wr, u32 uselkey) { @@ -3736,8 +3682,6 @@ struct nes_ib_device *nes_init_ofa_device(struct net_device *netdev) nesibdev->ibdev.mmap = nes_mmap; nesibdev->ibdev.alloc_pd = nes_alloc_pd; nesibdev->ibdev.dealloc_pd = nes_dealloc_pd; - nesibdev->ibdev.create_ah = nes_create_ah; - nesibdev->ibdev.destroy_ah = nes_destroy_ah; nesibdev->ibdev.create_qp = nes_create_qp; nesibdev->ibdev.modify_qp = nes_modify_qp; nesibdev->ibdev.query_qp = nes_query_qp; @@ -3754,10 +3698,6 @@ struct nes_ib_device *nes_init_ofa_device(struct net_device *netdev) nesibdev->ibdev.alloc_mr = nes_alloc_mr; nesibdev->ibdev.map_mr_sg = nes_map_mr_sg; - nesibdev->ibdev.attach_mcast = nes_multicast_attach; - nesibdev->ibdev.detach_mcast = nes_multicast_detach; - nesibdev->ibdev.process_mad = nes_process_mad; - nesibdev->ibdev.req_notify_cq = nes_req_notify_cq; nesibdev->ibdev.post_send = nes_post_send; nesibdev->ibdev.post_recv = nes_post_recv; diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index 8cc9459a9f9b..58188fe5aed2 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c @@ -254,12 +254,6 @@ int ocrdma_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr) return 0; } -int ocrdma_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr) -{ - /* modify_ah is unsupported */ - return -ENOSYS; -} - int ocrdma_process_mad(struct ib_device *ibdev, int process_mad_flags, u8 port_num, diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.h b/drivers/infiniband/hw/ocrdma/ocrdma_ah.h index 1a65c47945aa..c0c32c9b80ae 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.h @@ -55,7 +55,6 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *pd, struct rdma_ah_attr *ah_attr, struct ib_udata *udata); int ocrdma_destroy_ah(struct ib_ah *ah); int ocrdma_query_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr); -int ocrdma_modify_ah(struct ib_ah *ah, struct rdma_ah_attr *ah_attr); int ocrdma_process_mad(struct ib_device *, int process_mad_flags, diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 5962c0ed9847..7832ee3e0c84 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -176,7 +176,6 @@ static int ocrdma_register_device(struct ocrdma_dev *dev) dev->ibdev.create_ah = ocrdma_create_ah; dev->ibdev.destroy_ah = ocrdma_destroy_ah; dev->ibdev.query_ah = ocrdma_query_ah; - dev->ibdev.modify_ah = ocrdma_modify_ah; dev->ibdev.poll_cq = ocrdma_poll_cq; dev->ibdev.post_send = ocrdma_post_send; diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c index f95b97646c25..0f004c737620 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c @@ -278,19 +278,6 @@ int pvrdma_destroy_cq(struct ib_cq *cq) return ret; } -/** - * pvrdma_modify_cq - modify the CQ moderation parameters - * @ibcq: the CQ to modify - * @cq_count: number of CQEs that will trigger an event - * @cq_period: max period of time in usec before triggering an event - * - * @return: -EOPNOTSUPP as CQ resize is not supported. - */ -int pvrdma_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period) -{ - return -EOPNOTSUPP; -} - static inline struct pvrdma_cqe *get_cqe(struct pvrdma_cq *cq, int i) { return (struct pvrdma_cqe *)pvrdma_page_dir_get_ptr( @@ -428,16 +415,3 @@ int pvrdma_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc) /* Ensure we do not return errors from poll_cq */ return npolled; } - -/** - * pvrdma_resize_cq - resize CQ - * @ibcq: the completion queue - * @entries: CQ entries - * @udata: user data - * - * @return: -EOPNOTSUPP as CQ resize is not supported. - */ -int pvrdma_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) -{ - return -EOPNOTSUPP; -} diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c index 912933549dfb..a5719899f49a 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c @@ -214,8 +214,6 @@ static int pvrdma_register_device(struct pvrdma_dev *dev) dev->ib_dev.post_send = pvrdma_post_send; dev->ib_dev.post_recv = pvrdma_post_recv; dev->ib_dev.create_cq = pvrdma_create_cq; - dev->ib_dev.modify_cq = pvrdma_modify_cq; - dev->ib_dev.resize_cq = pvrdma_resize_cq; dev->ib_dev.destroy_cq = pvrdma_destroy_cq; dev->ib_dev.poll_cq = pvrdma_poll_cq; dev->ib_dev.req_notify_cq = pvrdma_req_notify_cq; @@ -259,7 +257,6 @@ static int pvrdma_register_device(struct pvrdma_dev *dev) dev->ib_dev.modify_srq = pvrdma_modify_srq; dev->ib_dev.query_srq = pvrdma_query_srq; dev->ib_dev.destroy_srq = pvrdma_destroy_srq; - dev->ib_dev.post_srq_recv = pvrdma_post_srq_recv; dev->srq_tbl = kcalloc(dev->dsr->caps.max_srq, sizeof(struct pvrdma_srq *), diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c index af235967a9c2..dc0ce877c7a3 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c @@ -52,13 +52,6 @@ #include "pvrdma.h" -int pvrdma_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, - struct ib_recv_wr **bad_wr) -{ - /* No support for kernel clients. */ - return -EOPNOTSUPP; -} - /** * pvrdma_query_srq - query shared receive queue * @ibsrq: the shared receive queue to query diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h index b7b25728a7e5..13b2a3592e6c 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h @@ -412,15 +412,10 @@ struct ib_mr *pvrdma_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type, u32 max_num_sg); int pvrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents, unsigned int *sg_offset); -int pvrdma_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period); -int pvrdma_resize_cq(struct ib_cq *ibcq, int entries, - struct ib_udata *udata); struct ib_cq *pvrdma_create_cq(struct ib_device *ibdev, const struct ib_cq_init_attr *attr, struct ib_ucontext *context, struct ib_udata *udata); -int pvrdma_resize_cq(struct ib_cq *ibcq, int entries, - struct ib_udata *udata); int pvrdma_destroy_cq(struct ib_cq *cq); int pvrdma_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc); int pvrdma_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags flags); @@ -435,8 +430,6 @@ int pvrdma_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, enum ib_srq_attr_mask attr_mask, struct ib_udata *udata); int pvrdma_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr); int pvrdma_destroy_srq(struct ib_srq *srq); -int pvrdma_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, - struct ib_recv_wr **bad_wr); struct ib_qp *pvrdma_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *init_attr,