linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH libibverbs V1 2/5] Add cross-channel QP flags
Date: Sat, 16 Jan 2016 17:53:41 +0200	[thread overview]
Message-ID: <1452959624-29454-3-git-send-email-leon@leon.nu> (raw)
In-Reply-To: <1452959624-29454-1-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

The cross-channel feature allows to execute WQEs that involve
synchronization of IO operations’ on different QPs.

This capability enables to program complex flows with a single
function call, hereby significantly reducing overhead associated
with IO processing.

The queue pairs can be configured to work as a “sync master queue”
or “sync slave queues”.

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.

  * IBV_QP_CREATE_IGNORE_SQ_OVERFLOW configures QP to discard overflow
    indications on send queue.

  * IBV_QP_CREATE_IGNORE_RQ_OVERFLOW instructs QP to discard overflow
    indications on receive queue.

Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 include/infiniband/verbs.h |  5 +++++
 man/ibv_create_qp_ex.3     | 18 ++++++++++++++++--
 src/cmd.c                  |  5 ++++-
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index 466d779592bf..7e85de08bfc9 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -769,6 +769,11 @@ 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,
+	IBV_QP_CREATE_IGNORE_SQ_OVERFLOW	= 1 << 5,
+	IBV_QP_CREATE_IGNORE_RQ_OVERFLOW	= 1 << 6
 };
 
 struct ibv_qp_init_attr_ex {
diff --git a/man/ibv_create_qp_ex.3 b/man/ibv_create_qp_ex.3
index f772a57b4c55..b80a586306c7 100644
--- a/man/ibv_create_qp_ex.3
+++ b/man/ibv_create_qp_ex.3
@@ -1,6 +1,6 @@
 .\" -*- nroff -*-
 .\"
-.TH IBV_CREATE_QP_EX 3 2013-06-26 libibverbs "Libibverbs Programmer's Manual"
+.TH IBV_CREATE_QP_EX 3 2015-12-27 libibverbs "Libibverbs Programmer's Manual"
 .SH "NAME"
 ibv_create_qp_ex, ibv_destroy_qp \- create or destroy a queue pair (QP)
 .SH "SYNOPSIS"
@@ -47,6 +47,16 @@ uint32_t                max_recv_sge;   /* Requested max number of s/g elements
 uint32_t                max_inline_data;/* Requested max number of data (bytes) that can be posted inline to the SQ, otherwise 0 */
 .in -8
 };
+.sp
+.mf
+enum ibv_qp_create_flags {
+	IBV_QP_CREATE_BLOCK_SELF_MCAST_LB	= 1 << 1,
+	IBV_QP_CREATE_CROSS_CHANNEL             = 1 << 2, /* Set QP to work in cross-channel mode */
+	IBV_QP_CREATE_MANAGED_SEND              = 1 << 3, /* Send work request posted to this QP won't be executed immediately and requires enabling /*
+	IBV_QP_CREATE_MANAGED_RECV              = 1 << 4, /* Receive work request posted to this QP won't be executed immediately and requires enabling */
+	IBV_QP_CREATE_IGNORE_SQ_OVERFLOW        = 1 << 5, /* Configure QP to discard overflow indications on send queue */
+	IBV_QP_CREATE_IGNORE_RQ_OVERFLOW        = 1 << 6  /* Configure QP to discard overflow indications on receive queue */
+};
 .fi
 .PP
 The function
@@ -80,4 +90,8 @@ fails if the QP is attached to a multicast group.
 .BR ibv_query_qp (3)
 .SH "AUTHORS"
 .TP
-Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
+Yishai Hadas
+.RI < yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org >
+.TP
+Leon Romanovsky
+.RI < leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org >
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,
-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-01-16 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-16 15:53 [PATCH V1 libibverbs 0/5] Add cross-channel support Leon Romanovsky
     [not found] ` <1452959624-29454-1-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-01-16 15:53   ` [PATCH libibverbs V1 1/5] Add CQ ignore overrun flag Leon Romanovsky
2016-01-16 15:53   ` Leon Romanovsky [this message]
2016-01-16 15:53   ` [PATCH libibverbs V1 3/5] Add cross-channel work requests primitives Leon Romanovsky
2016-01-16 15:53   ` [PATCH libibverbs V1 4/5] Export cross-channel capability flag Leon Romanovsky
2016-01-16 15:53   ` [PATCH libibverbs V1 5/5] Add an example of cross-channel synchronization Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452959624-29454-3-git-send-email-leon@leon.nu \
    --to=leon-2ukjvaziz/y@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).