From patchwork Thu Apr 23 13:12:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weihang Li X-Patchwork-Id: 11505643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A5A592C for ; Thu, 23 Apr 2020 13:13:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 220A5208E4 for ; Thu, 23 Apr 2020 13:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbgDWNNF (ORCPT ); Thu, 23 Apr 2020 09:13:05 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35892 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726524AbgDWNNF (ORCPT ); Thu, 23 Apr 2020 09:13:05 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 77463E280C3A02D1A79A; Thu, 23 Apr 2020 21:13:01 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Thu, 23 Apr 2020 21:12:52 +0800 From: Weihang Li To: , CC: , , Subject: [PATCH v2 for-next 0/5] RDMA/hns: Refactor process of buffer allocation and calculation Date: Thu, 23 Apr 2020 21:12:45 +0800 Message-ID: <1587647570-46972-1-git-send-email-liweihang@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Patch #1 and #2 aim to use MTR interfaces for PBL buffer instead of MTT, and after this, MTT can be removed completely. Patch #3 and #5 refactor buffer size calculation process for WQE and SRQ. #4 can be considered as a preparation for #5, which just moves code of SRQ together to a more suitable place. This series looks huge, but most of the modification is to replace and remove old interfaces, and patch #4 also contribute a lot. Actually, the original logic is not changed so much. Changes since v1: - Remove meaningless judgment of count in some inline functions in #3. - Add more information into commit messages of #3 and #5. Xi Wang (4): RDMA/hns: Optimize PBL buffer allocation process RDMA/hns: Remove unused MTT functions RDMA/hns: Optimize WQE buffer size calculating process RDMA/hns: Optimize SRQ buffer size calculating process Yixian Liu (1): RDMA/hns: Move SRQ code to the reasonable place drivers/infiniband/hw/hns/hns_roce_alloc.c | 43 - drivers/infiniband/hw/hns/hns_roce_device.h | 110 +-- drivers/infiniband/hw/hns/hns_roce_hem.c | 105 --- drivers/infiniband/hw/hns/hns_roce_hem.h | 6 - drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 45 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 941 ++++++++++---------- drivers/infiniband/hw/hns/hns_roce_main.c | 70 +- drivers/infiniband/hw/hns/hns_roce_mr.c | 1250 +++------------------------ drivers/infiniband/hw/hns/hns_roce_qp.c | 313 +++---- drivers/infiniband/hw/hns/hns_roce_srq.c | 16 +- 10 files changed, 768 insertions(+), 2131 deletions(-)