diff mbox

[libibverbs,V1,1/5] Add CQ ignore overrun flag

Message ID 1452959624-29454-2-git-send-email-leon@leon.nu (mailing list archive)
State Deferred
Headers show

Commit Message

Leon Romanovsky Jan. 16, 2016, 3:53 p.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

A CQ overrun is checked while posting a completion, and if
encountered, the QP is transferred to the appropriate error
state.

CQ update (and error discovery) are not synchronized with
WQE execution. In cross-channel mode, the send/receive
queues will forward their completions to managing QP.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
---
 include/infiniband/verbs.h |  1 +
 man/ibv_create_cq_ex.3     | 18 ++++++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index c3e863850d4e..466d779592bf 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -1207,6 +1207,7 @@  enum ibv_create_cq_attr {
 
 enum ibv_create_cq_attr_flags {
 	IBV_CREATE_CQ_ATTR_COMPLETION_TIMESTAMP	= 1 << 0,
+	IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN       = 1 << 1
 };
 
 struct ibv_create_cq_attr_ex {
diff --git a/man/ibv_create_cq_ex.3 b/man/ibv_create_cq_ex.3
index 9f9e049b0d43..f01a5513926b 100644
--- a/man/ibv_create_cq_ex.3
+++ b/man/ibv_create_cq_ex.3
@@ -1,6 +1,6 @@ 
 .\" -*- nroff -*-
 .\"
-.TH IBV_CREATE_CQ_EX 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
+.TH IBV_CREATE_CQ_EX 3 2015-12-27 libibverbs "Libibverbs Programmer's Manual"
 .SH "NAME"
 ibv_create_cq_ex \- create a completion queue (CQ)
 .SH "SYNOPSIS"
@@ -42,13 +42,19 @@  enum ibv_wc_flags_ex {
         IBV_WC_EX_WITH_SLID                  = 1 << 7,  /* Require slid in WC */
         IBV_WC_EX_WITH_SL                    = 1 << 8,  /* Require sl in WC */
         IBV_WC_EX_WITH_DLID_PATH_BITS        = 1 << 9,  /* Require dlid path bits in WC */
-        IBV_WC_EX_WITH_COMPLETION_TIMESTAMP  = 1 << 10, /* Require completion timestamp in WC /*
+        IBV_WC_EX_WITH_COMPLETION_TIMESTAMP  = 1 << 10, /* Require completion timestamp in WC */
 };
 
+enum ibv_create_cq_attr_flags {
+	IBV_CREATE_CQ_ATTR_COMPLETION_TIMESTAMP	= 1 << 0,
+	IBV_CREATE_CQ_ATTR_IGNORE_OVERRUN	= 1 << 1 /* Ignore completion queue overrun errors */
+};
 
 enum ibv_create_cq_attr {
-        IBV_CREATE_CQ_ATTR_FLAGS             = 1 << 0,
+	IBV_CREATE_CQ_ATTR_FLAGS	= 1 << 0,
+	IBV_CREATE_CQ_ATTR_RESERVED	= 1 << 1
 };
+
 .SH "RETURN VALUE"
 .B ibv_create_cq_ex()
 returns a pointer to the CQ, or NULL if the request fails.
@@ -68,4 +74,8 @@  CQ should be destroyed with ibv_destroy_cq.
 .BR ibv_create_qp (3)
 .SH "AUTHORS"
 .TP
-Matan Barak <matanb@mellanox.com>
+Matan Barak
+.RI < matanb@mellanox.com >
+.TP
+Leon Romanovsky
+.RI < leonro@mellanox.com >