From patchwork Sun Jan 21 16:16:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10176991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 72E18600F5 for ; Sun, 21 Jan 2018 16:22:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61469205AF for ; Sun, 21 Jan 2018 16:22:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5655A26E5D; Sun, 21 Jan 2018 16:22:10 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 B4441205AF for ; Sun, 21 Jan 2018 16:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751281AbeAUQWH (ORCPT ); Sun, 21 Jan 2018 11:22:07 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:50832 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751243AbeAUQWF (ORCPT ); Sun, 21 Jan 2018 11:22:05 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 21 Jan 2018 18:17:18 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w0LGHITF009894; Sun, 21 Jan 2018 18:17:18 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id w0LGHHbW012965; Sun, 21 Jan 2018 18:17:17 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id w0LGHHDD012964; Sun, 21 Jan 2018 18:17:17 +0200 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, monis@mellanox.com, jgg@mellanox.com, majd@mellanox.com Subject: [PATCH V1 rdma-core 1/4] verbs: Introduce driver QP type Date: Sun, 21 Jan 2018 18:16:56 +0200 Message-Id: <1516551419-12829-2-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1516551419-12829-1-git-send-email-yishaih@mellanox.com> References: <1516551419-12829-1-git-send-email-yishaih@mellanox.com> 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 From: Moni Shoua Vendors can implement types of QPs that are not described in the InfiniBand specification. Verbs layer doesn't know which services this QP provides but it assumes that the hardware driver does. The new QP type IBV_QPT_DRIVER should be used for this kind of QP. Any extra data that describes this QP should be stored in a context in the hardware driver that is associated with this QP. Signed-off-by: Moni Shoua Reviewed-by: Yishai Hadas --- libibverbs/man/ibv_create_qp.3 | 5 ++++- libibverbs/man/ibv_create_qp_ex.3 | 5 ++++- libibverbs/verbs.h | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libibverbs/man/ibv_create_qp.3 b/libibverbs/man/ibv_create_qp.3 index 78d7f43..1cdf247 100644 --- a/libibverbs/man/ibv_create_qp.3 +++ b/libibverbs/man/ibv_create_qp.3 @@ -29,7 +29,7 @@ struct ibv_cq *send_cq; /* CQ to be associated with the Send Que struct ibv_cq *recv_cq; /* CQ to be associated with the Receive Queue (RQ) */ struct ibv_srq *srq; /* SRQ handle if QP is to be associated with an SRQ, otherwise NULL */ struct ibv_qp_cap cap; /* QP capabilities */ -enum ibv_qp_type qp_type; /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD or IBV_QPT_RAW_PACKET */ +enum ibv_qp_type qp_type; /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD, IBV_QPT_RAW_PACKET or IBV_QPT_DRIVER */ int sq_sig_all; /* If set, each Work Request (WR) submitted to the SQ generates a completion entry */ .in -8 }; @@ -77,6 +77,9 @@ if the QP is to be associated with an SRQ. .PP .B ibv_destroy_qp() fails if the QP is attached to a multicast group. +.PP +.B IBV_QPT_DRIVER +does not represent a specific service and is used for vendor specific QP logic. .SH "SEE ALSO" .BR ibv_alloc_pd (3), .BR ibv_modify_qp (3), diff --git a/libibverbs/man/ibv_create_qp_ex.3 b/libibverbs/man/ibv_create_qp_ex.3 index bb2d1b6..3429a65 100644 --- a/libibverbs/man/ibv_create_qp_ex.3 +++ b/libibverbs/man/ibv_create_qp_ex.3 @@ -29,7 +29,7 @@ struct ibv_cq *send_cq; /* CQ to be associated with the Send Que struct ibv_cq *recv_cq; /* CQ to be associated with the Receive Queue (RQ) */ struct ibv_srq *srq; /* SRQ handle if QP is to be associated with an SRQ, otherwise NULL */ struct ibv_qp_cap cap; /* QP capabilities */ -enum ibv_qp_type qp_type; /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD or IBV_QPT_RAW_PACKET */ +enum ibv_qp_type qp_type; /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD, IBV_QPT_RAW_PACKET or IBV_QPT_DRIVER */ int sq_sig_all; /* If set, each Work Request (WR) submitted to the SQ generates a completion entry */ uint32_t comp_mask; /* Identifies valid fields */ struct ibv_pd *pd; /* PD to be associated with the QP */ @@ -120,6 +120,9 @@ The attribute source_qpn is supported only on UD QP, without flow steering RX sh .PP .B ibv_destroy_qp() fails if the QP is attached to a multicast group. +.PP +.B IBV_QPT_DRIVER +does not represent a specific service and is used for vendor specific QP logic. .SH "SEE ALSO" .BR ibv_alloc_pd (3), .BR ibv_modify_qp (3), diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 997597a..ad71b73 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -805,7 +805,8 @@ enum ibv_qp_type { IBV_QPT_UD, IBV_QPT_RAW_PACKET = 8, IBV_QPT_XRC_SEND = 9, - IBV_QPT_XRC_RECV + IBV_QPT_XRC_RECV, + IBV_QPT_DRIVER = 0xff, }; struct ibv_qp_cap {