@@ -40,9 +40,10 @@ enum ibv_wc_flags_ex {
IBV_WC_EX_WITH_SLID = 1 << 4, /* Require slid in WC */
IBV_WC_EX_WITH_SL = 1 << 5, /* Require sl in WC */
IBV_WC_EX_WITH_DLID_PATH_BITS = 1 << 6, /* Require dlid path bits in WC */
- IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7, /* Require completion timestamp in WC /*
+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP = 1 << 7, /* Require completion device timestamp in WC /*
IBV_WC_EX_WITH_CVLAN = 1 << 8, /* Require VLAN info in WC */
IBV_WC_EX_WITH_FLOW_TAG = 1 << 9, /* Require flow tag in WC */
+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK = 1 << 11, /* Require completion wallclock timestamp in WC */
};
enum ibv_cq_init_attr_mask {
@@ -132,7 +133,11 @@ Below members and functions are used in order to poll the current completion. Th
Get the dlid_path_bits field from the current completion.
.BI "uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex " "*cq"); \c
- Get the completion timestamp from the current completion.
+ Get the completion timestamp from the current completion in HCA clock units.
+
+.BI "uint64_t ibv_wc_read_completion_wallclock_ns(struct ibv_cq_ex " *cq ");
+Get the completion timestamp from the current completion and convert it
+from HCA clock units to wall clock nanoseconds.
.BI "uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex " "*cq"); \c
Get the CVLAN field from the current completion.
@@ -466,6 +466,7 @@ enum ibv_create_cq_wc_flags {
IBV_WC_EX_WITH_CVLAN = 1 << 8,
IBV_WC_EX_WITH_FLOW_TAG = 1 << 9,
IBV_WC_EX_WITH_TM_INFO = 1 << 10,
+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK = 1 << 11,
};
enum {
@@ -483,7 +484,8 @@ enum {
IBV_WC_EX_WITH_COMPLETION_TIMESTAMP |
IBV_WC_EX_WITH_CVLAN |
IBV_WC_EX_WITH_FLOW_TAG |
- IBV_WC_EX_WITH_TM_INFO
+ IBV_WC_EX_WITH_TM_INFO |
+ IBV_WC_EX_WITH_COMPLETION_TIMESTAMP_WALLCLOCK
};
enum ibv_wc_flags {
@@ -1205,6 +1207,7 @@ struct ibv_cq_ex {
uint32_t (*read_flow_tag)(struct ibv_cq_ex *current);
void (*read_tm_info)(struct ibv_cq_ex *current,
struct ibv_wc_tm_info *tm_info);
+ uint64_t (*read_completion_wallclock_ns)(struct ibv_cq_ex *current);
};
static inline struct ibv_cq *ibv_cq_ex_to_cq(struct ibv_cq_ex *cq)
@@ -1307,6 +1310,11 @@ static inline uint64_t ibv_wc_read_completion_ts(struct ibv_cq_ex *cq)
return cq->read_completion_ts(cq);
}
+static inline uint64_t ibv_wc_read_completion_wallclock_ns(struct ibv_cq_ex *cq)
+{
+ return cq->read_completion_wallclock_ns(cq);
+}
+
static inline uint16_t ibv_wc_read_cvlan(struct ibv_cq_ex *cq)
{
return cq->read_cvlan(cq);