From patchwork Tue Jan 1 09:30:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 10745931 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 EBD89746 for ; Tue, 1 Jan 2019 09:30:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0D7028770 for ; Tue, 1 Jan 2019 09:30:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4FAA28779; Tue, 1 Jan 2019 09:30:54 +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,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 ADF0828770 for ; Tue, 1 Jan 2019 09:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbfAAJax (ORCPT ); Tue, 1 Jan 2019 04:30:53 -0500 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:6312 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbfAAJax (ORCPT ); Tue, 1 Jan 2019 04:30:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1546335052; x=1577871052; h=from:to:cc:subject:date:message-id:mime-version; bh=ETvc/ecngDDuR4dqEl7r3jyZU0J1N5ixthPSyjSEtKM=; b=SMGPbsZ9olc5C/BfKXKoBid0p6v/uckqJvs32J7oJwem2hnBJHjAVOU5 UvfZ6Pn+5gFxntjhzSZ37oPSwoBMqY8329TULMlyc5zMHOnw9MtfsFcRU E8Jm+KTOg5a4saRiXNyGWdgK05741cwfw62rw9Fdevo8XrxOlxnCDn4aX A=; X-IronPort-AV: E=Sophos;i="5.56,253,1539648000"; d="scan'208";a="650854308" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Jan 2019 09:30:49 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x019Ul1w111831 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 1 Jan 2019 09:30:47 GMT Received: from EX13D02EUC003.ant.amazon.com (10.43.164.10) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 1 Jan 2019 09:30:47 +0000 Received: from EX13MTAUEE001.ant.amazon.com (10.43.62.200) by EX13D02EUC003.ant.amazon.com (10.43.164.10) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 1 Jan 2019 09:30:46 +0000 Received: from galpress-VirtualBox.hfa16.amazon.com (10.218.62.26) by mail-relay.amazon.com (10.43.62.226) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 1 Jan 2019 09:30:43 +0000 From: Gal Pressman To: Jason Gunthorpe , Doug Ledford CC: , Alexander Matushevsky , Yossi Leybovich , Dave Goodell , "Brian Barrett" , Leah Shalev , Sean Hefty , Gal Pressman Subject: [PATCH RFC 0/2] IB device in-kernel API support indication Date: Tue, 1 Jan 2019 11:30:23 +0200 Message-ID: <1546335025-31360-1-git-send-email-galpress@amazon.com> X-Mailer: git-send-email 2.7.4 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 Hello all, This RFC allows device drivers to indicate their support for in-kernel API through a flag in the IB device. Currently, devices that do not support in-kernel APIs (such as usnic) have no way to communicate that to the ULPs which try to use the device and fail. Instead, make the driver advertise its support upfront and allow clients to exit gracefully in case of unsupported device. Patch #1 adds the flag to the IB device, sets all existing drivers as kernel verbs providers and chanes the IB clients. Patch #2 changes usnic driver to a non-kernel verbs provider as it offers no kernel API support. This RFC is introduced following the discussion over the EFA driver [1], which initially does not provide in-kernel API support. [1] https://patchwork.kernel.org/cover/10711629/ Thanks, Gal Gal Pressman (2): RDMA: Add indication for in kernel API support to IB device IB/usnic: Mark device as a non kernel verbs provider drivers/infiniband/core/cm.c | 3 +++ drivers/infiniband/core/cma.c | 3 +++ drivers/infiniband/core/mad.c | 3 +++ drivers/infiniband/core/multicast.c | 3 +++ drivers/infiniband/core/sa_query.c | 3 +++ drivers/infiniband/core/ucm.c | 3 ++- drivers/infiniband/core/user_mad.c | 3 +++ drivers/infiniband/hw/bnxt_re/main.c | 1 + drivers/infiniband/hw/cxgb3/iwch_provider.c | 1 + drivers/infiniband/hw/cxgb4/provider.c | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + drivers/infiniband/hw/mlx4/main.c | 1 + drivers/infiniband/hw/mlx5/main.c | 1 + drivers/infiniband/hw/mthca/mthca_provider.c | 1 + drivers/infiniband/hw/nes/nes_verbs.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 + drivers/infiniband/hw/qedr/main.c | 1 + drivers/infiniband/hw/usnic/usnic_ib_main.c | 1 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 1 + drivers/infiniband/sw/rdmavt/vt.c | 1 + drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.c | 3 +++ drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +++ include/rdma/ib_verbs.h | 1 + net/rds/ib.c | 4 ++-- net/smc/smc_ib.c | 2 +- 29 files changed, 49 insertions(+), 5 deletions(-)