From patchwork Sun Jan 21 16:16:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10176993 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 9E5C46055D 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 8D32A26E55 for ; Sun, 21 Jan 2018 16:22:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8259C26E56; 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 2C2E826E55 for ; Sun, 21 Jan 2018 16:22:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbeAUQWI (ORCPT ); Sun, 21 Jan 2018 11:22:08 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:50830 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751255AbeAUQWG (ORCPT ); Sun, 21 Jan 2018 11:22:06 -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 w0LGHIlm009897; 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 w0LGHIrK012969; Sun, 21 Jan 2018 18:17:18 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id w0LGHICm012968; Sun, 21 Jan 2018 18:17:18 +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 2/4] mlx5: Add interface to create DC transport QPs Date: Sun, 21 Jan 2018 18:16:57 +0200 Message-Id: <1516551419-12829-3-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 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 Reviewed-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 84c5099..db82e46 100644 --- a/providers/mlx5/mlx5dv.h +++ b/providers/mlx5/mlx5dv.h @@ -143,11 +143,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,