Add support for filling the timestamp field in ibv_poll_cq_ex
(if it's required by the user).

Signed-off-by: Matan Barak <[email protected]>
---
 src/cq.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/cq.c b/src/cq.c
index 0185696..5e06990 100644
--- a/src/cq.c
+++ b/src/cq.c
@@ -913,6 +913,11 @@ inline int mlx5_poll_one_ex(struct mlx5_cq *cq,
        wc_ex->wc_flags = 0;
        wc_ex->reserved = 0;
 
+       if (wc_flags & IBV_WC_EX_WITH_COMPLETION_TIMESTAMP) {
+               *wc_buffer.b64++ = ntohll(cqe64->timestamp);
+               wc_ex->wc_flags |= IBV_WC_EX_WITH_COMPLETION_TIMESTAMP;
+       }
+
        switch (opcode) {
        case MLX5_CQE_REQ:
                err = mlx5_poll_one_cqe_req(cq, cur_rsc, cqe, qpn, cqe_ver,
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to