From patchwork Sun Dec 20 11:22:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 7891761 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 05D7A9F350 for ; Sun, 20 Dec 2015 11:24:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29C0C2047B for ; Sun, 20 Dec 2015 11:24:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 421022047D for ; Sun, 20 Dec 2015 11:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754330AbbLTLYE (ORCPT ); Sun, 20 Dec 2015 06:24:04 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:33786 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932506AbbLTLYD (ORCPT ); Sun, 20 Dec 2015 06:24:03 -0500 Received: by mail-wm0-f47.google.com with SMTP id p187so36658220wmp.0 for ; Sun, 20 Dec 2015 03:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leon-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=QRkdR/zwAp/mduM4BcB/1n4ojaxFnshzBCrYe65v+4U=; b=TYoPV1xLQsFBSEzuTixxW8IbZpjk+UmhEgd6amzQrRNDLLx3K9qcjGf8QjVEpSQOLV 2E6aryjzz27FUKWJmrDBrj5AIXhhVZvMiVrqUk+gy7Z5Trvusz7NIGeB+kPI6/zSIYnW +pzcKuGFEPDa3tkGVSFFU1iC2oPU+NSP6JtpDMbiiu7/N5t7K9us6LNcXvneapbwAhWb bZxvABJyrJglhdbzcqIeKBZLRKAZQVICf3FdZ98EqRSucXvojkKSJqtgEkkRZogUYNsY Fejc5xLmx9lHQuGxteBnXWXVgpeH+EbPXKXeQHwyasetgffdr3Jmg0JOejB6zeRzYo0u vcFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=QRkdR/zwAp/mduM4BcB/1n4ojaxFnshzBCrYe65v+4U=; b=GI0lD9b6jucjTqFdcW/Yf4ZkCsdDMOMYbx+sTybcz6/X3cnaABr38eNE1LrYKriqm1 6sxql1OuUP1C2GJ6jeZ9NTy40RGJ/mVBICYGc2e+l4J/5PHcvqvlcsTsszFGiLcnauC5 NfKDXwsxwXER5M7leDNJWR/EkkAMLWj+3ZraspLju61LWA8ZceyIiXnHeiV8p9dJRlsT Ss4Hsv7jy3x0Ll78wbXJs2AGob5Uc8MVY7+t+of+Px43NARtlhEIaWOL1aAqCIjUgDT0 BQ0L4ogRY8s33irrlwKBLR4fiaQY+CvKrf1t8NK77yCFDuSzBZbsX5VVzKNQrkx50Mm1 RqsQ== X-Gm-Message-State: ALoCoQmK3aoRDEceGe+sRslVAstYySTW2necVgXKc2PmMuCmxo++XztQ1pugPYMtaPZW0Zfkd4XdT8xYcsUcjXjJ5wMb2MRP6A== X-Received: by 10.194.92.4 with SMTP id ci4mr17213774wjb.175.1450610642412; Sun, 20 Dec 2015 03:24:02 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id qm9sm23072294wjc.39.2015.12.20.03.24.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Dec 2015 03:24:01 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH libibverbs 2/3] libibverbs: Add cross-channel QP initialization flags Date: Sun, 20 Dec 2015 13:22:43 +0200 Message-Id: <1450610564-17279-3-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450610564-17279-1-git-send-email-leon@leon.nu> References: <1450610564-17279-1-git-send-email-leon@leon.nu> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky The cross-channel feature allows to execute WQEs that involve synchronization of I/O operations' on different QPs. These QPs should be configured to work as a "sync master queue" or “sync slave queues”. The QP property flags to indicate if queues are slave or master: * IB_QP_CREATE_MANAGED_SEND indicates that posted send work requests will not be executed immediately and requires enabling. * IB_QP_CREATE_MANAGED_RECV indicates that posted receive work requests will not be executed immediately and requires enabling. * IB_QP_CREATE_CROSS_CHANNEL declares the QP to work in cross-channel mode. If IB_QP_CREATE_MANAGED_SEND and IB_QP_CREATE_MANAGED_RECV are not provided, this QP will be sync master queue, else it will be sync slave. Signed-off-by: Leon Romanovsky --- include/infiniband/verbs.h | 3 +++ src/cmd.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index d8069d52ae13..2b9b50c87f45 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -769,6 +769,9 @@ enum ibv_qp_init_attr_mask { enum ibv_qp_create_flags { IBV_QP_CREATE_BLOCK_SELF_MCAST_LB = 1 << 1, + IBV_QP_CREATE_CROSS_CHANNEL = 1 << 2, + IBV_QP_CREATE_MANAGED_SEND = 1 << 3, + IBV_QP_CREATE_MANAGED_RECV = 1 << 4 }; struct ibv_qp_init_attr_ex { diff --git a/src/cmd.c b/src/cmd.c index 675777a8ee5a..ae33491befb4 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -815,7 +815,10 @@ static void create_qp_handle_resp_common(struct ibv_context *context, } enum { - CREATE_QP_EX2_SUP_CREATE_FLAGS = IBV_QP_CREATE_BLOCK_SELF_MCAST_LB, + CREATE_QP_EX2_SUP_CREATE_FLAGS = IBV_QP_CREATE_BLOCK_SELF_MCAST_LB | + IBV_QP_CREATE_CROSS_CHANNEL | + IBV_QP_CREATE_MANAGED_SEND | + IBV_QP_CREATE_MANAGED_RECV }; int ibv_cmd_create_qp_ex2(struct ibv_context *context,