MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_txpp_init_timestamp

Function mlx5_txpp_init_timestamp

dpdk/drivers/net/mlx5/mlx5_txpp.c:608–625  ·  view source on GitHub ↗

Waits for the first completion on Clock Queue to init timestamp. */

Source from the content-addressed store, hash-verified

606
607/* Waits for the first completion on Clock Queue to init timestamp. */
608static inline void
609mlx5_txpp_init_timestamp(struct mlx5_dev_ctx_shared *sh)
610{
611 struct mlx5_txpp_wq *wq = &sh->txpp.clock_queue;
612 uint32_t wait;
613
614 sh->txpp.ts_p = 0;
615 sh->txpp.ts_n = 0;
616 for (wait = 0; wait < MLX5_TXPP_WAIT_INIT_TS; wait++) {
617 mlx5_txpp_update_timestamp(sh);
618 if (wq->sq_ci)
619 return;
620 /* Wait one millisecond and try again. */
621 rte_delay_us_sleep(US_PER_S / MS_PER_S);
622 }
623 DRV_LOG(ERR, "Unable to initialize timestamp.");
624 sh->txpp.sync_lost = 1;
625}
626
627#ifdef HAVE_IBV_DEVX_EVENT
628/* Gather statistics for timestamp from Clock Queue CQE. */

Callers 1

mlx5_txpp_start_serviceFunction · 0.85

Calls 2

rte_delay_us_sleepFunction · 0.50

Tested by

no test coverage detected