From patchwork Tue Dec 11 08:59:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 10723217 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 80E5B91E for ; Tue, 11 Dec 2018 08:59:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7211C29B3B for ; Tue, 11 Dec 2018 08:59:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65DFF29E06; Tue, 11 Dec 2018 08:59:42 +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 EB02D29B3B for ; Tue, 11 Dec 2018 08:59:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726089AbeLKI7l (ORCPT ); Tue, 11 Dec 2018 03:59:41 -0500 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:17895 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbeLKI7l (ORCPT ); Tue, 11 Dec 2018 03:59:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1544518780; x=1576054780; h=from:to:cc:subject:date:message-id:mime-version; bh=PgmFwYyzpzoqfddRH+rPGZTvYOJS3Zwe/W1wUmrzSZY=; b=YlA3Fc5afg3rXCiR0ujWBzI2W/Jarl/Bk0+F7dx9nN5S5nAKfBhpmdzH pYKpinznzUARwp7vnzPWV2Ai1pN3DVI5SbphTHd3SPY/hXFGnNpHDwn+l tAoZNmN8vKfJCnTQAclDk1vksiGEooo0YrmsU7qvpQaiRtgqnDJY+Men1 I=; X-IronPort-AV: E=Sophos;i="5.56,253,1539648000"; d="scan'208";a="371834172" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-62350142.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Dec 2018 08:59:39 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-62350142.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id wBB8xdlZ116358 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 11 Dec 2018 08:59:39 GMT Received: from EX13D19EUB004.ant.amazon.com (10.43.166.61) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 11 Dec 2018 08:59:39 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D19EUB004.ant.amazon.com (10.43.166.61) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 11 Dec 2018 08:59:38 +0000 Received: from galpress-VirtualBox.amazon.com (10.218.62.26) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 11 Dec 2018 08:59:35 +0000 From: Gal Pressman To: Doug Ledford , Jason Gunthorpe CC: , Gal Pressman Subject: [PATCH rdma-next 0/4] Mark create/destroy address handle calls as atomic/sleepable Date: Tue, 11 Dec 2018 10:59:24 +0200 Message-ID: <1544518768-16361-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 'sleepable' flag to create/destroy address handle flows 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. I had some issues with rdmavt callbacks, it looks like their create_ah function is not matching the callback signature. Not entirely sure if that's intended or not so I didn't change it, let me know what you think about that. 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 | 4 ++-- drivers/infiniband/core/user_mad.c | 4 ++-- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/uverbs_std_types.c | 2 +- drivers/infiniband/core/verbs.c | 21 ++++++++++------ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 ++++++---- 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 | 32 ++++++++++++++----------- 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 | 6 ++--- 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/mad.c | 2 +- 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 | 11 ++++++--- 38 files changed, 126 insertions(+), 94 deletions(-)