From patchwork Mon Dec 10 19:09:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10722249 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 562D93E9D for ; Mon, 10 Dec 2018 19:10:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 460AB2A97B for ; Mon, 10 Dec 2018 19:10:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A6562A84D; Mon, 10 Dec 2018 19:10:22 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 A92192A97B for ; Mon, 10 Dec 2018 19:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbeLJTKV (ORCPT ); Mon, 10 Dec 2018 14:10:21 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37402 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727244AbeLJTKV (ORCPT ); Mon, 10 Dec 2018 14:10:21 -0500 Received: by mail-wr1-f65.google.com with SMTP id j10so11648808wru.4 for ; Mon, 10 Dec 2018 11:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SBjRAYqtBuUz58+IkCuF7foZpeIhW1m/exdr0zhLVIo=; b=OZuZVd909wHMT71DM7HF18jfiUZdhhv+zsag4zmn52IMlCD9hxs+dbgBLOBMrc26c+ H/9S5a6EhDFfg5BTrvEjXdTsQJdFInhtuZUGu/HvG9No6lqhzO7KQJWD7twW2eG9dtOk nNfVuA5YtQKhy9snZrgdrm2JiZHdKUNoemJ73bydv6WUyKn6AsPJJ3CIoLbiicXmgW4T S4vC0xx1rHS90YhTk84dHUAAq4+BxZsVP0qgCjcYE0L4K5+RakNI7Li+S35bGM6OyKMt P1SXyUJbtvLrOQqGCH6Gj4ECvfGb+IFQc4vgSEd4tPxl9zsCuS8I9axM1NNoTezyrau9 AtBA== 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:mime-version :content-transfer-encoding; bh=SBjRAYqtBuUz58+IkCuF7foZpeIhW1m/exdr0zhLVIo=; b=jQWJQEyXWg8uqEJoI14qeWLizLcVB5B8MCnqfTmPj7ttLMIDZ22W2qeA/eP4KcTemX yta9ZporeWIkGwj0b75mt0PGx4Y7sfO//pbomkr5nhHPMOATIHvVYooAvhspZcdrvLyC /iz+x0YPGTg1cLgqT4+DJd/Y55lrs+uTFGidr+OreRb34seBvYUXaAzFScqUljxUbM+v kSWaUhUPv/eYxSqyWGbscv2lB2ewGVH+iRO5i3Cb2ePTz+gzgLkrkjp/9UdUu19y9hUs uubKzhmSglvlc5vAeh3BMAknaoj0BksgJ7GDHJRWmRUb+9XADsXNvMM4H4W9gN/ZAkRw Nf5g== X-Gm-Message-State: AA+aEWYb2pqQ3Bh7RqC+JxbfLrtbFkddjSoZLVTQjWGNtJdFlMY8Ceus Jd62fOXeYyqX5E1tgT2bL1GQiKzf X-Google-Smtp-Source: AFSGD/V71ChqyJk2LVfYE8lBcYO3sMItqGOBoAqbKJI7IQgmVFfwyhI3ej9Zxc1bipWpdEhRMj4P8g== X-Received: by 2002:adf:ed46:: with SMTP id u6mr11529316wro.262.1544469018572; Mon, 10 Dec 2018 11:10:18 -0800 (PST) Received: from kheib-workstation.redhat.com (bzq-109-64-38-215.red.bezeqint.net. [109.64.38.215]) by smtp.gmail.com with ESMTPSA id o5sm33847657wmg.25.2018.12.10.11.10.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 11:10:18 -0800 (PST) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next v5 00/20] RDMA: Add support for ib_device_ops Date: Mon, 10 Dec 2018 21:09:28 +0200 Message-Id: <20181210190948.6892-1-kamalheib1@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 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 This patchset introduce a new structure that will contain all the infiniband device operations, the structure will be used by the providers to initialize their supported operations. This patchset also includes the required changes in the core and ulps to start using it. Changes from v4: * Include the missing fist patch. * Include patch [1] that this patch set depend on and it should be dropped when merging for-rc with for-next. [1] RDMA/rdmavt: Fix rvt_create_ah function signature Changes from v3: * Rebase. * Sort the operations initialization alphabetically. * Rearrange the operation within the ib_device_ops structure so data path operations are located at the beginning of the struct. * This patch set now depend on a702f6ce0711 ("RDMA/rdmavt: Fix rvt_create_ah function signature"). Changes from v2: * Sort the operations based on logical groups. * Add patch 18 for fixing rvt_create_ah prototype. * Add patch 19 for initialize ib_device_ops struct. Changes from V1: * Rebase. * Constify the ib_device_ops. * Remove vertical white spaces. * Clang-format ib_device_ops struct. * Return the descriptive comments into ib_device_ops struct. * Move the assignment of the ib_device operations to the last patch in the patchset. * Remove the existing method assignment at the same time of initializing the ib_device_ops. Thanks, Kamal Kamal Heib (20): RDMA/rdmavt: Fix rvt_create_ah function signature RDMA/core: Introduce ib_device_ops RDMA/bnxt_re: Initialize ib_device_ops struct RDMA/cxgb3: Initialize ib_device_ops struct RDMA/cxgb4: Initialize ib_device_ops struct RDMA/hfi1: Initialize ib_device_ops struct RDMA/hns: Initialize ib_device_ops struct RDMA/i40iw: Initialize ib_device_ops struct RDMA/mlx4: Initialize ib_device_ops struct RDMA/mlx5: Initialize ib_device_ops struct RDMA/mthca: Initialize ib_device_ops struct RDMA/nes: Initialize ib_device_ops struct RDMA/ocrdma: Initialize ib_device_ops struct RDMA/qedr: Initialize ib_device_ops struct RDMA/qib: Initialize ib_device_ops struct RDMA/usnic: Initialize ib_device_ops struct RDMA/vmw_pvrdma: Initialize ib_device_ops struct RDMA/rxe: Initialize ib_device_ops struct RDMA/rdmavt: Initialize ib_device_ops struct RDMA: Start use ib_device_ops drivers/infiniband/core/cache.c | 12 +- drivers/infiniband/core/core_priv.h | 12 +- drivers/infiniband/core/cq.c | 6 +- drivers/infiniband/core/device.c | 137 ++++- drivers/infiniband/core/fmr_pool.c | 4 +- drivers/infiniband/core/mad.c | 24 +- drivers/infiniband/core/nldev.c | 4 +- drivers/infiniband/core/opa_smi.h | 4 +- drivers/infiniband/core/rdma_core.c | 6 +- drivers/infiniband/core/security.c | 8 +- drivers/infiniband/core/smi.h | 4 +- drivers/infiniband/core/sysfs.c | 28 +- drivers/infiniband/core/ucm.c | 2 +- drivers/infiniband/core/uverbs_cmd.c | 58 +- drivers/infiniband/core/uverbs_main.c | 14 +- drivers/infiniband/core/uverbs_std_types.c | 2 +- .../core/uverbs_std_types_counters.c | 10 +- drivers/infiniband/core/uverbs_std_types_cq.c | 6 +- drivers/infiniband/core/uverbs_std_types_dm.c | 6 +- .../core/uverbs_std_types_flow_action.c | 14 +- drivers/infiniband/core/uverbs_std_types_mr.c | 4 +- drivers/infiniband/core/verbs.c | 159 +++--- drivers/infiniband/hw/bnxt_re/main.c | 96 ++-- drivers/infiniband/hw/cxgb3/iwch_provider.c | 64 ++- drivers/infiniband/hw/cxgb4/provider.c | 74 +-- drivers/infiniband/hw/hfi1/verbs.c | 18 +- drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 11 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 18 + drivers/infiniband/hw/hns/hns_roce_main.c | 114 ++-- drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 63 ++- drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 178 +++--- drivers/infiniband/hw/mlx5/main.c | 230 ++++---- drivers/infiniband/hw/mthca/mthca_provider.c | 139 +++-- drivers/infiniband/hw/nes/nes_cm.c | 2 +- drivers/infiniband/hw/nes/nes_verbs.c | 67 +-- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 92 +-- drivers/infiniband/hw/qedr/main.c | 103 ++-- drivers/infiniband/hw/qib/qib_verbs.c | 8 +- drivers/infiniband/hw/usnic/usnic_ib_main.c | 61 +- .../infiniband/hw/vmw_pvrdma/pvrdma_main.c | 82 +-- drivers/infiniband/sw/rdmavt/ah.c | 4 +- drivers/infiniband/sw/rdmavt/ah.h | 3 +- drivers/infiniband/sw/rdmavt/vt.c | 299 ++-------- drivers/infiniband/sw/rxe/rxe_verbs.c | 90 +-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 +- drivers/infiniband/ulp/iser/iser_memory.c | 4 +- .../infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 8 +- drivers/infiniband/ulp/srp/ib_srp.c | 6 +- fs/cifs/smbdirect.c | 2 +- include/rdma/ib_verbs.h | 534 ++++++++---------- include/rdma/uverbs_ioctl.h | 12 +- net/rds/ib.c | 4 +- net/sunrpc/xprtrdma/fmr_ops.c | 2 +- 56 files changed, 1482 insertions(+), 1440 deletions(-)