IB/mlx5: Expose CQE version to user-space
Per user context, work with CQE version that both the user-space
and the kernel support. Report this CQE version via the response of
the alloc_ucontext command.
Signed-off-by: Haggai Abramovsky <hagaya@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
diff --git a/drivers/infiniband/hw/mlx5/user.h b/drivers/infiniband/hw/mlx5/user.h
index 5bf0935..41f0525 100644
--- a/drivers/infiniband/hw/mlx5/user.h
+++ b/drivers/infiniband/hw/mlx5/user.h
@@ -69,6 +69,10 @@
__u32 num_low_latency_uuars;
__u32 flags;
__u32 comp_mask;
+ __u8 max_cqe_version;
+ __u8 reserved0;
+ __u16 reserved1;
+ __u32 reserved2;
};
enum mlx5_ib_alloc_ucontext_resp_mask {
@@ -89,7 +93,9 @@
__u16 reserved1;
__u32 comp_mask;
__u32 response_length;
- __u32 reserved2;
+ __u8 cqe_version;
+ __u8 reserved2;
+ __u16 reserved3;
__u64 hca_core_clock_offset;
};