mlx5dv_get_clock_info(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | AUTHORS | COLOPHON

MLX5DV_G...LOCK_INFO(3) Library Functions Manual MLX5DV_G...LOCK_INFO(3)

NAME         top

       mlx5dv_get_clock_info - Get device clock information

SYNOPSIS         top

       #include <infiniband/mlx5dv.h>

       int mlx5dv_get_clock_info(struct ibv_context *ctx_in,
                                 struct mlx5dv_clock_info *clock_info);

DESCRIPTION         top

       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 struct mlx5dv_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.

RETURN VALUE         top

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

SEE ALSO         top

       mlx5dv(7), mlx5dv_ts_to_ns(3)

AUTHORS         top

       Feras Daoud <ferasda@mellanox.com>

COLOPHON         top

       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2023-12-22.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2023-12-20.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

1.0.0                          2017-11-08        MLX5DV_G...LOCK_INFO(3)

Pages that refer to this page: mlx5dv_get_clock_info(3)mlx5dv_ts_to_ns(3)