This patch maps the new page to user space applications to allow converting a user space completion timestamp to system wall time at the lowest possible latency cost. By using a versioning scheme we allow compatibility between current and future userspace libraries. The change moves mlx5_ib_mmap_cmd enum from mlx5_ib.h to the abi header file mlx5-abi.h.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -124,7 +124,7 @@ struct mlx5_ib_alloc_ucontext_resp { · 123 unmodified lines | ||
| 124 | 124 | __u8 cqe_version; |
| 125 | 125 | __u8 cmds_supp_uhw; |
| 126 | 126 | __u8 eth_min_inline; |
| 127 | − __u8 reserved2; | |
| 127 | + __u8 clock_info_versions; | |
| 128 | 128 | __u64 hca_core_clock_offset; |
| 129 | 129 | __u32 log_uar_size; |
| 130 | 130 | __u32 num_uars_per_page; |
| @@ -394,7 +394,23 @@ struct mlx5_ib_clock_info { · 263 unmodified lines | ||
| 394 | 394 | __u64 overflow_period; |
| 395 | 395 | }; |
| 396 | 396 | |
| 397 | +enum mlx5_ib_mmap_cmd { | |
| 398 | + MLX5_IB_MMAP_REGULAR_PAGE = 0, | |
| 399 | + MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1, | |
| 400 | + MLX5_IB_MMAP_WC_PAGE = 2, | |
| 401 | + MLX5_IB_MMAP_NC_PAGE = 3, | |
| 402 | + /* 5 is chosen in order to be compatible with old versions of libmlx5 */ | |
| 403 | + MLX5_IB_MMAP_CORE_CLOCK = 5, | |
| 404 | + MLX5_IB_MMAP_ALLOC_WC = 6, | |
| 405 | + MLX5_IB_MMAP_CLOCK_INFO = 7, | |
| 406 | +}; | |
| 407 | + | |
| 397 | 408 | enum { |
| 398 | 409 | MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1, |
| 399 | 410 | }; |
| 411 | + | |
| 412 | +/* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */ | |
| 413 | +enum { | |
| 414 | + MLX5_IB_CLOCK_INFO_V1 = 0, | |
| 415 | +}; | |
| 400 | 416 | #endif /* MLX5_ABI_USER_H */ |