logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mlx5dv_get_clock_info - Get device clock information

Authors

Feras Daoud <ferasda@mellanox.com> 1.0.0 2017-11-08 MLX5DV_GET_CLOCK_INFO(3)

Description

Get the updated core clock_info from the device driver. This information will be used later to translate the completion timestamp from HCA core clock to nanoseconds. The values of the clock are updated from the driver's PTP clock, therefore, without a running PTP client on the machine, the wall clock conversion will not be accurate. Pass the latest structmlx5dv_clock_info to mlx5dv_ts_to_ns(3) in order to translate the completion timestamp from HCA core clock to nanoseconds. If the clock_info becomes too old then time conversion will return wrong conversion results. The user must ensure that mlx5dv_get_clock_info(3) is called at least once every max_clock_info_update_nsec as returned by the mlx5dv_query_device(3) function.

Name

mlx5dv_get_clock_info - Get device clock information

Return Value

0 on success or the value of errno on failure (which indicates the failure reason).

See Also

mlx5dv(7), mlx5dv_ts_to_ns(3)

Synopsis

#include<infiniband/mlx5dv.h>intmlx5dv_get_clock_info(structibv_context*ctx_in,structmlx5dv_clock_info*clock_info);

See Also