From patchwork Sat Nov 24 08:49:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Ou X-Patchwork-Id: 10696429 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 DDB6417FE for ; Sat, 24 Nov 2018 08:12:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8B6A2ADE2 for ; Sat, 24 Nov 2018 08:12:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7A582ADF5; Sat, 24 Nov 2018 08:12:41 +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=-7.9 required=2.0 tests=BAYES_00,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 302552ADED for ; Sat, 24 Nov 2018 08:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727880AbeKXTAT (ORCPT ); Sat, 24 Nov 2018 14:00:19 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:15151 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725902AbeKXTAT (ORCPT ); Sat, 24 Nov 2018 14:00:19 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C87C33D0963F; Sat, 24 Nov 2018 16:12:36 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Sat, 24 Nov 2018 16:12:35 +0800 From: Lijun Ou To: , CC: , Subject: [PATCH v3 for-next 0/4] SRQ support for hip08 Date: Sat, 24 Nov 2018 16:49:18 +0800 Message-ID: <1543049362-97091-1-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected 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 patch series implement the SRQ(Share Receive Queue) feature for hip08. It includes the SRQ verbs and updates the poll cq verb to deal with SRQ complementions as well as add the process flow of SRQ asynchronous event. Change from V2: 1. Use xarray API instead of radix tree API 2. Fix a bug with spin unlock location in hns_roce_srq_event Change from V1: 1. Separate it from the original patchset("hns misc updates for 4.20") 2. Use spin lock instead of rcu lock in order to keep the same with qp event after analysis jason's review. Lijun Ou (4): RDMA/hns: Eanble SRQ capacity for hip08 RDMA/hns: Init SRQ table for hip08 RDMA/hns: Add SRQ support for hip08 kernel mode RDMA/hns: Add SRQ asynchronous event support drivers/infiniband/hw/hns/Makefile | 2 +- drivers/infiniband/hw/hns/hns_roce_alloc.c | 2 + drivers/infiniband/hw/hns/hns_roce_cmd.h | 4 + drivers/infiniband/hw/hns/hns_roce_device.h | 92 +++++- drivers/infiniband/hw/hns/hns_roce_hem.c | 41 ++- drivers/infiniband/hw/hns/hns_roce_hem.h | 2 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 406 +++++++++++++++++++++++-- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 95 ++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 83 +++++ drivers/infiniband/hw/hns/hns_roce_mr.c | 137 ++++++++- drivers/infiniband/hw/hns/hns_roce_qp.c | 21 +- drivers/infiniband/hw/hns/hns_roce_srq.c | 456 ++++++++++++++++++++++++++++ include/uapi/rdma/hns-abi.h | 6 + 13 files changed, 1292 insertions(+), 55 deletions(-) create mode 100644 drivers/infiniband/hw/hns/hns_roce_srq.c