src/dpdk/drivers/net/mlx5/windows/mlx5_ethdev_os.c
int
mlx5_read_clock(struct rte_eth_dev *dev, uint64_t *clock)
{
	int err;
	struct mlx5_devx_clock mlx5_clock;
	struct mlx5_priv *priv = dev->data->dev_private;
	mlx5_context_st *context_obj = (mlx5_context_st *)priv->sh->ctx;

	err = mlx5_glue->query_rt_values(context_obj, &mlx5_clock);
	if (err != 0) {
		DRV_LOG(WARNING, "Could not query the clock");
		return err;
	}
	*clock = *(uint64_t volatile *)mlx5_clock.p_iseg_internal_timer;
	return 0;
}
/**
 * Get device current raw clock counter
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 * @param[out] time
 *   Current raw clock counter of the device.
 *
 * @return
 *   0 if the clock has correctly been read
 *   The value of errno in case of error
 */
Get device current raw clock counter
@param dev
Pointer to Ethernet device structure.
@param[out] time
Current raw clock counter of the device.

@return
0 if the clock has correctly been read
The value of errno in case of error
Get device current raw clock counter @param dev Pointer to Ethernet device structure . @param [ out ] time Current raw clock counter of the device . @return 0 if the clock has correctly been read The value of errno in case of error
int
mlx5_read_clock(struct rte_eth_dev *dev, uint64_t *clock)
{
	int err;
	struct mlx5_devx_clock mlx5_clock;
	struct mlx5_priv *priv = dev->data->dev_private;
	mlx5_context_st *context_obj = (mlx5_context_st *)priv->sh->ctx;
	err = mlx5_glue->query_rt_values(context_obj, &mlx5_clock);
	if (err != 0) {
		DRV_LOG(WARNING, "Could not query the clock");
		return err;
	}
	*clock = *(uint64_t volatile *)mlx5_clock.p_iseg_internal_timer;
	return 0;
}
int mlx5_read_clock ( struct rte_eth_dev * dev , uint64_t * clock ) { int err ; struct mlx5_devx_clock mlx5_clock ; struct mlx5_priv * priv = dev -> data -> dev_private ; mlx5_context_st * context_obj = ( mlx5_context_st * ) priv -> sh -> ctx ; err = mlx5_glue -> query_rt_values ( context_obj , & mlx5_clock ) ; if ( err != 0 ) { DRV_LOG ( WARNING , " " ) ; return err ; } * clock = * ( uint64_t volatile * ) mlx5_clock . p_iseg_internal_timer ; return 0 ; }
Get device current raw clock counter
 @param dev
   Pointer to Ethernet device structure.
Get device current raw clock counter @param dev Pointer to Ethernet device structure .