Waits for the first completion on Clock Queue to init timestamp. */
| 606 | |
| 607 | /* Waits for the first completion on Clock Queue to init timestamp. */ |
| 608 | static inline void |
| 609 | mlx5_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. */ |
no test coverage detected