From patchwork Wed Jul 25 09:03:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Ou X-Patchwork-Id: 10543729 X-Patchwork-Delegate: leon@leon.nu 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 27D23139A for ; Wed, 25 Jul 2018 09:05:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18AF429BB6 for ; Wed, 25 Jul 2018 09:05:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D3AC29BAF; Wed, 25 Jul 2018 09:05:00 +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 A4ADB29B49 for ; Wed, 25 Jul 2018 09:04:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728632AbeGYKPn (ORCPT ); Wed, 25 Jul 2018 06:15:43 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:53770 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728567AbeGYKPn (ORCPT ); Wed, 25 Jul 2018 06:15:43 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5136EEA4C9F4; Wed, 25 Jul 2018 17:04:52 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Wed, 25 Jul 2018 17:04:49 +0800 From: Lijun Ou To: , , CC: Subject: [PATCH rdma-core 2/2] libhns: Modify cq support for libhns Date: Wed, 25 Jul 2018 17:03:29 +0800 Message-ID: <1532509409-183771-3-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1532509409-183771-1-git-send-email-oulijun@huawei.com> References: <1532509409-183771-1-git-send-email-oulijun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] 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 adds modify cq verbs for hip08 libhns. Signed-off-by: Lijun Ou --- providers/hns/hns_roce_u.c | 1 + providers/hns/hns_roce_u.h | 1 + providers/hns/hns_roce_u_verbs.c | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/providers/hns/hns_roce_u.c b/providers/hns/hns_roce_u.c index 1ec5858..0d12ad5 100644 --- a/providers/hns/hns_roce_u.c +++ b/providers/hns/hns_roce_u.c @@ -74,6 +74,7 @@ static const struct verbs_context_ops hns_common_ops = { .query_qp = hns_roce_u_query_qp, .reg_mr = hns_roce_u_reg_mr, .rereg_mr = hns_roce_u_rereg_mr, + .modify_cq = hns_roce_u_modify_cq, }; static struct verbs_context *hns_roce_alloc_context(struct ibv_device *ibdev, diff --git a/providers/hns/hns_roce_u.h b/providers/hns/hns_roce_u.h index 2b2070f..6c56bee 100644 --- a/providers/hns/hns_roce_u.h +++ b/providers/hns/hns_roce_u.h @@ -279,6 +279,7 @@ struct ibv_cq *hns_roce_u_create_cq(struct ibv_context *context, int cqe, struct ibv_comp_channel *channel, int comp_vector); +int hns_roce_u_modify_cq(struct ibv_cq *cq, struct ibv_modify_cq_attr *attr); int hns_roce_u_destroy_cq(struct ibv_cq *cq); void hns_roce_u_cq_event(struct ibv_cq *cq); diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c index 962cdb5..14eeb5e 100644 --- a/providers/hns/hns_roce_u_verbs.c +++ b/providers/hns/hns_roce_u_verbs.c @@ -338,6 +338,13 @@ void hns_roce_u_cq_event(struct ibv_cq *cq) to_hr_cq(cq)->arm_sn++; } +int hns_roce_u_modify_cq(struct ibv_cq *cq, struct ibv_modify_cq_attr *attr) +{ + struct ibv_modify_cq cmd = {}; + + return ibv_cmd_modify_cq(cq, attr, &cmd, sizeof(cmd)); +} + int hns_roce_u_destroy_cq(struct ibv_cq *cq) { int ret;