`max_clock_info_update_nsec` field (in mlx5dv.h) seems in us rather then ns unit

I use v5.8-2.0.3.0 LTS driver and CX-5 and CX-6 Dx NIC card.

I want to get the clock info from NIC.

I have check themlx5dv_get_clock_info man doc:

If the clock_info becomes too old then time conversion will return wrong conversion results. The user mustensure 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.

So I use mlx5dv_query_device to get max_clock_info_update_nsec:

struct mlx5dv_context mlx5dv_attr;
memset(&mlx5dv_attr, 0, sizeof(mlx5dv_attr));
mlx5dv_attr.comp_mask |= MLX5DV_CONTEXT_MASK_CLOCK_INFO_UPDATE;
mlx5dv_query_device(m_context, &mlx5dv_attr);

mlx5dv_query_device return success, and I check the mlx5dv_attr.max_clock_info_update_nsec field.

I found this field is about 1100000 on CX-5 card and 700000 on CX-6 Dx card. If the unit is nano second, it means I should update clock info every 1ms? It’s too short and unreasonable.

The old dirver doc says we need to update clock info every 1s, not 1ms on CX-5 NIC. So I think the unit should be us rather than ns.

I think the filed name should be fixed to max_clock_info_update_usec, or driver should filling real ns value into it.

Related code in RDMA-core:

Hello g199209,

Welcome, and thank you for posting your inquiry to the NVIDIA Developer Forums!

This request will require engineering input and effort, as such you will need to open a support ticket with NVIDIA Enterprise Experience so the appropriate teams can be formally engaged.

If you have valid support entitlement, please open a ticket via our enterprise portal: https://enterprise-support.nvidia.com/s/create-case. Our support teams will be able to assist you with this request.

Best regards,
NVIDIA Enterprise Experience