From patchwork Wed Dec 12 09:09:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 10725727 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 19A2C174F for ; Wed, 12 Dec 2018 09:09:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05D9C2A223 for ; Wed, 12 Dec 2018 09:09:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E98BE2A329; Wed, 12 Dec 2018 09:09: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=-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 7C53D2A223 for ; Wed, 12 Dec 2018 09:09:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726810AbeLLJJW (ORCPT ); Wed, 12 Dec 2018 04:09:22 -0500 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:3806 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbeLLJJV (ORCPT ); Wed, 12 Dec 2018 04:09:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1544605761; x=1576141761; h=from:to:cc:subject:date:message-id:mime-version; bh=FaRPzaV1NSNaWfsjIQI6ihK0aRRKA70NcXW7ZcCKAVI=; b=fLjpN4cTlmn0CCD9c6/7pc9xKY7OQo5PwUIUwa1RXDFPHn/A7tTpXVBl Zlh4yL5f1GBNixwBO3ozqNFsHY3ax0Vmu7sPTcTe2ZwNAJKKh9AeFHFtj PS3rRZGIlSlzB18yH145NjMP+0uzieJcgulMX9XkltFYMEQ/y9pu1mECF 8=; X-IronPort-AV: E=Sophos;i="5.56,253,1539648000"; d="scan'208";a="770595521" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-2b-5bdc5131.us-west-2.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2018 09:09:19 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2b-5bdc5131.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id wBC99HPd025031 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 12 Dec 2018 09:09:18 GMT Received: from EX13D19EUA002.ant.amazon.com (10.43.165.247) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 12 Dec 2018 09:09:18 +0000 Received: from EX13MTAUEE001.ant.amazon.com (10.43.62.200) by EX13D19EUA002.ant.amazon.com (10.43.165.247) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 12 Dec 2018 09:09:16 +0000 Received: from galpress-VirtualBox.hfa13.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; Wed, 12 Dec 2018 09:09:15 +0000 From: Gal Pressman To: Doug Ledford , Jason Gunthorpe CC: , Gal Pressman Subject: [PATCH rdma-next v2 0/4] Mark create/destroy address handle calls as atomic/sleepable Date: Wed, 12 Dec 2018 11:09:04 +0200 Message-ID: <1544605748-20791-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 Hi Jason and Doug, This patchset adds a new 'flags' field to create/destroy address handle flow and a flag that marks whether the callback is executed in a sleepable context in order to allow drivers to wait for device completion instead of busy polling when possible. Patches #1, #2 add the flag to create/destroy AH callbacks and change all the drivers, patches #3, #4 change bnxt_re driver to make use of the flag and not poll for firmware completion. Note that I left the bool function parameter in the bnxt_re internal qplib calls because that's consistent with all other functions, changed it anywhere else. Changelog: v1->v2: * Rebased on top of rdmavt callbacks fixes by Kamal and adjust the callbacks accordingly * Use flags and an enum instead of bool flag * Make bnxt_re_create_shadow_qp_ah call create AH as sleepable (changed from non-sleepable) * Make bnxt_re_destroy_qp call destroy AH as sleepable (changed from non-sleepable) Thanks, Gal Gal Pressman (4): RDMA: Mark if create address handle is in a sleepable context RDMA: Mark if destroy address handle is in a sleepable context RDMA/bnxt_re: Make use of create AH sleepable flag RDMA/bnxt_re: Make use of destroy AH sleepable flag drivers/infiniband/core/agent.c | 4 ++-- drivers/infiniband/core/cm.c | 6 +++--- drivers/infiniband/core/mad_rmpp.c | 10 ++++----- drivers/infiniband/core/sa_query.c | 5 +++-- drivers/infiniband/core/user_mad.c | 4 ++-- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_std_types.c | 3 ++- drivers/infiniband/core/verbs.c | 21 ++++++++++++------- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 13 +++++++----- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 3 ++- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 10 +++++---- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 6 ++++-- drivers/infiniband/hw/hfi1/mad.c | 2 +- drivers/infiniband/hw/hns/hns_roce_ah.c | 3 ++- drivers/infiniband/hw/hns/hns_roce_device.h | 3 ++- drivers/infiniband/hw/mlx4/ah.c | 6 +++--- drivers/infiniband/hw/mlx4/mad.c | 28 ++++++++++++------------- drivers/infiniband/hw/mlx4/mlx4_ib.h | 4 ++-- drivers/infiniband/hw/mlx5/ah.c | 4 ++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 ++-- drivers/infiniband/hw/mthca/mthca_mad.c | 7 ++++--- drivers/infiniband/hw/mthca/mthca_provider.c | 3 ++- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_ah.h | 4 ++-- drivers/infiniband/hw/qedr/verbs.c | 4 ++-- drivers/infiniband/hw/qedr/verbs.h | 4 ++-- drivers/infiniband/hw/qib/qib_mad.c | 3 ++- drivers/infiniband/hw/qib/qib_verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 3 ++- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 3 ++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 6 ++++-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 4 ++-- drivers/infiniband/sw/rdmavt/ah.c | 5 ++++- drivers/infiniband/sw/rdmavt/ah.h | 3 ++- drivers/infiniband/sw/rdmavt/mad.c | 3 ++- drivers/infiniband/sw/rxe/rxe_verbs.c | 3 ++- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 4 ++-- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 8 +++---- drivers/infiniband/ulp/srpt/ib_srpt.c | 4 ++-- include/rdma/ib_verbs.h | 20 +++++++++++++++--- 40 files changed, 142 insertions(+), 96 deletions(-)