From patchwork Thu Jan 4 16:49:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10145181 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 693AC605BD for ; Thu, 4 Jan 2018 16:49:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 694B727F8C for ; Thu, 4 Jan 2018 16:49:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BDC12841C; Thu, 4 Jan 2018 16:49:58 +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 11A94280FC for ; Thu, 4 Jan 2018 16:49:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408AbeADQty (ORCPT ); Thu, 4 Jan 2018 11:49:54 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:38848 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753423AbeADQtw (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 w04GnlZ8004565; Thu, 4 Jan 2018 18:49:47 +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 w04Gnl3f011488; Thu, 4 Jan 2018 18:49:47 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id w04GnkeJ011487; 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 2/4] mlx5: Add interface to create DC transport QPs Date: Thu, 4 Jan 2018 18:49:19 +0200 Message-Id: <1515084561-11374-3-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 Extend mlx5dv_create_qp() function to add attributes that are used to create DC transport QPs, DCT (target) and DCI (initiator). Signed-off-by: Moni Shoua Signed-off-by: Yishai Hadas --- providers/mlx5/mlx5dv.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/providers/mlx5/mlx5dv.h b/providers/mlx5/mlx5dv.h index 0e78c41..1f9bd0a 100644 --- a/providers/mlx5/mlx5dv.h +++ b/providers/mlx5/mlx5dv.h @@ -141,11 +141,23 @@ enum mlx5dv_qp_create_flags { enum mlx5dv_qp_init_attr_mask { MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS = 1 << 0, + MLX5DV_QP_INIT_ATTR_MASK_DC = 1 << 1, +}; + +enum mlx5dv_dc_type { + MLX5DV_DCTYPE_DCT = 1, + MLX5DV_DCTYPE_DCI, +}; + +struct mlx5dv_dc_init_attr { + enum mlx5dv_dc_type dc_type; + uint64_t dct_access_key; }; struct mlx5dv_qp_init_attr { uint64_t comp_mask; /* Use enum mlx5dv_qp_init_attr_mask */ uint32_t create_flags; /* Use enum mlx5dv_qp_create_flags */ + struct mlx5dv_dc_init_attr dc_init_attr; }; struct ibv_qp *mlx5dv_create_qp(struct ibv_context *context,