From patchwork Thu Jan 4 16:49:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10145175 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.web.codeaurora.org (Postfix) with ESMTP id E48FC6034B for ; Thu, 4 Jan 2018 16:49:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6AAE28524 for ; Thu, 4 Jan 2018 16:49:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA8D0285CD; Thu, 4 Jan 2018 16:49:55 +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 66B20280FC for ; Thu, 4 Jan 2018 16:49:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbeADQtx (ORCPT ); Thu, 4 Jan 2018 11:49:53 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:38814 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753403AbeADQtw (ORCPT ); Thu, 4 Jan 2018 11:49:52 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 4 Jan 2018 18:49:47 +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 w04Gnkoi004562; Thu, 4 Jan 2018 18:49:46 +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 w04GnkBU011484; Thu, 4 Jan 2018 18:49:46 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id w04Gnk7a011482; Thu, 4 Jan 2018 18:49:46 +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 rdma-core 1/4] verbs: Introduce driver QP type Date: Thu, 4 Jan 2018 18:49:18 +0200 Message-Id: <1515084561-11374-2-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1515084561-11374-1-git-send-email-yishaih@mellanox.com> References: <1515084561-11374-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 Signed-off-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 7b53a6f..d9317df 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -797,7 +797,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 {