From patchwork Sun Oct 21 12:49:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10650755 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 5B42B14DE for ; Sun, 21 Oct 2018 12:50:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4165228765 for ; Sun, 21 Oct 2018 12:50:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F59E2877B; Sun, 21 Oct 2018 12:50:16 +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 A98C128765 for ; Sun, 21 Oct 2018 12:50:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727631AbeJUVE1 (ORCPT ); Sun, 21 Oct 2018 17:04:27 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50725 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbeJUVE1 (ORCPT ); Sun, 21 Oct 2018 17:04:27 -0400 Received: by mail-wm1-f66.google.com with SMTP id i8-v6so7571217wmg.0 for ; Sun, 21 Oct 2018 05:50: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; bh=iTfCN7JDj9zZ9wUUBm7w/sIjKvKlxxvnfu+23U2dzzQ=; b=o8273ZRL81n3yW26EVV7UUCkU5zDhG/YmtlefZh3y6g5s2CLkj1dGQLMCzM1NqR+Bp ZBO5wyPHwqZYnFgLpyX2LcFTtDp/IXQZxk1yqhF/p4L6T3O9XMNOW6H0GXfqPGDdHbLX gurtOU6ec3fSxvpnik8+a0Kyh7Jt4GHd1o317elNqvG9jK8oXO2FuEjqr9pvbB3Zp+Ht tjZ3etcAeEzY3ZQ+9yA8AWkotUPduaxc9oCYNdNwrD0ARPjQuBQvaO/vFXcCT7SLYZUc mOQ6kc4IQydMXzhGrW+eNnrKHUUUv8GtVI43ZWarj3AXq4HaVcyQpWTrgQ41PJDNCiF2 mmKw== 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; bh=iTfCN7JDj9zZ9wUUBm7w/sIjKvKlxxvnfu+23U2dzzQ=; b=WzO91jh80OMHV3pe/PIC8klgOQQVnGx/+gAe5dqLDP+DF6UZTudSoHZBwOzg2qxNDK sV4RiOQeb3CUSQVTBXmiLSrDoyaVBwbrUa6yJ0WFEIs5lKlE1Oij8YjBqlYXatzXhnxR WNIv/Gk877wkmKnAl7fpD8hw0EKv5Oas/PhPkwJyaFwuXgFrz1RbvXY2IwA1M4Nb+A/N YVAjXtr2f5teDJb0mLes3Yjgv5b3KsrEhkbrd4vXUMdj7gCTbBT8WZ6KIs0wg9h0uYuD MtyQ2GHVLvNB9JMTSAWs4u/PpJ8CgauO+X3XtqM+Dzn8ZqUes1uLxo9rKzIYmxRic8W+ cfsw== X-Gm-Message-State: ABuFfojvks37NkK229Mfa8+vb/tmTISK1+Hp7Oe9SXbhO+K8yYfOeOEs rfwQ14rSutgUXYTmayXltBw= X-Google-Smtp-Source: ACcGV62F7INVpp0JJyU1wVDxDWm/eCrZhajw5klNJ2D00NN6/toVqoWT/+cgKfVDCDXGN1Hncbe1CA== X-Received: by 2002:a1c:1804:: with SMTP id 4-v6mr11659577wmy.29.1540126212057; Sun, 21 Oct 2018 05:50:12 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.216]) by smtp.gmail.com with ESMTPSA id v76-v6sm14375380wmd.32.2018.10.21.05.50.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 Oct 2018 05:50:11 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next v2 00/18] RDMA: Add support for ib_device_ops Date: Sun, 21 Oct 2018 15:49:35 +0300 Message-Id: <20181021124953.11558-1-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.5 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 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 (18): 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: 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 | 135 +++++- 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 | 64 +-- drivers/infiniband/core/uverbs_main.c | 14 +- drivers/infiniband/core/uverbs_std_types.c | 2 +- .../infiniband/core/uverbs_std_types_counters.c | 10 +- drivers/infiniband/core/uverbs_std_types_cq.c | 4 +- drivers/infiniband/core/uverbs_std_types_dm.c | 6 +- .../infiniband/core/uverbs_std_types_flow_action.c | 14 +- drivers/infiniband/core/uverbs_std_types_mr.c | 4 +- drivers/infiniband/core/verbs.c | 149 +++--- 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 | 19 +- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 11 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 11 + drivers/infiniband/hw/hns/hns_roce_main.c | 102 ++-- drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 66 +-- drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 178 +++---- drivers/infiniband/hw/mlx5/main.c | 222 +++++---- 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 +-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 82 ++-- drivers/infiniband/sw/rdmavt/vt.c | 90 ++-- drivers/infiniband/sw/rxe/rxe_verbs.c | 90 ++-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 12 +- drivers/infiniband/ulp/iser/iser_memory.c | 4 +- drivers/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 | 525 ++++++++++----------- net/rds/ib.c | 4 +- net/sunrpc/xprtrdma/fmr_ops.c | 2 +- 53 files changed, 1438 insertions(+), 1223 deletions(-)