History

IB/mlx5: Mmap the HCA's clock info to user-space

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.

Feras Daoud committed 8 years ago

Commit 5c99eae1 parent 24d33d23 files · +59 −13Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/rdma/mlx5-abi.h+17−1
@@ -124,7 +124,7 @@ struct mlx5_ib_alloc_ucontext_resp { · 123 unmodified lines
124 __u8 cqe_version;124 __u8 cqe_version;
125 __u8 cmds_supp_uhw;125 __u8 cmds_supp_uhw;
126 __u8 eth_min_inline;126 __u8 eth_min_inline;
127 __u8 reserved2;127 __u8 clock_info_versions;
128 __u64 hca_core_clock_offset;128 __u64 hca_core_clock_offset;
129 __u32 log_uar_size;129 __u32 log_uar_size;
130 __u32 num_uars_per_page;130 __u32 num_uars_per_page;
@@ -394,7 +394,23 @@ struct mlx5_ib_clock_info { · 263 unmodified lines
394 __u64 overflow_period;394 __u64 overflow_period;
395};395};
396 396
397enum 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
397enum {408enum {
398 MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,409 MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
399};410};
411
412/* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */
413enum {
414 MLX5_IB_CLOCK_INFO_V1 = 0,
415};
400#endif /* MLX5_ABI_USER_H */416#endif /* MLX5_ABI_USER_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t