1MLX5DV_GET_CLOCK_INFO(3) Library Functions Manual MLX5DV_GET_CLOCK_INFO(3)
2
3
4
6 mlx5dv_get_clock_info - Get device clock information
7
9 #include <infiniband/mlx5dv.h>
10
11 int mlx5dv_get_clock_info(struct ibv_context *ctx_in,
12 struct mlx5dv_clock_info *clock_info);
13
15 Get the updated core clock_info from the device driver. This informa‐
16 tion will be used later to translate the completion timestamp from HCA
17 core clock to nanoseconds. The values of the clock are updated from the
18 driver's PTP clock, therefore, without a running PTP client on the
19 machine, the wall clock conversion will not be accurate.
20
21 Pass the latest struct mlx5dv_clock_info to mlx5dv_ts_to_ns(3) in order
22 to translate the completion timestamp from HCA core clock to nanosec‐
23 onds.
24
25 If the clock_info becomes too old then time conversion will return
26 wrong conversion results. The user must ensure that
27 mlx5dv_get_clock_info(3) is called at least once every
28 max_clock_info_update_nsec as returned by the mlx5dv_query_device(3)
29 function.
30
32 0 on success or the value of errno on failure (which indicates the
33 failure reason).
34
36 mlx5dv(7), mlx5dv_ts_to_ns(3)
37
39 Feras Daoud <ferasda@mellanox.com>
40
41
42
431.0.0 2017-11-08 MLX5DV_GET_CLOCK_INFO(3)