[PATCH V1 libibverbs 4/8] Add completion timestamp support for ibv_poll_cq_ex

Yishai Hadas
2016-02-24T09:42:00Z

From: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Add support for raw completion timestamp through
ibv_poll_cq_ex.

Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
include/infiniband/verbs.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index a64e320..232b0df 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -401,6 +401,7 @@ enum ibv_wc_flags_ex {
IBV_WC_EX_WITH_SLID = 1 << 9,
IBV_WC_EX_WITH_SL = 1 << 10,
IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 11,
+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 12,
};

enum {
@@ -417,6 +418,10 @@ enum {
/* fields order in wc_ex
* Note: To guarantee compatibility a new field will be added after fields
* of the same size.
+ * // Raw timestamp of completion. A raw timestamp is implementation
+ * // defined and can not be relied upon to have any ordering value
+ * // between more than one HCA or driver.
+ * uint64_t completion_timestamp;
* uint32_t byte_len,
* uint32_t imm_data;
* uint32_t qp_num;
@@ -428,7 +433,7 @@ enum {
*/

enum {
- IBV_WC_EX_WITH_64BIT_FIELDS = 0
+ IBV_WC_EX_WITH_64BIT_FIELDS = IBV_WC_EX_WITH_COMPLETION_TIMESTAMP
};

enum {
--
1.8.3.1