src/dpdk/drivers/net/mlx5/mlx5_flow_age.c
static void
mlx5_flow_aso_alarm(void *arg)
{
	struct mlx5_dev_ctx_shared *sh = arg;
	struct mlx5_aso_sq *sq = &sh->aso_age_mng->aso_sq;
	uint32_t us = 100u;
	uint16_t n;

	rte_spinlock_lock(&sh->aso_age_mng->resize_sl);
	n = sh->aso_age_mng->next;
	rte_spinlock_unlock(&sh->aso_age_mng->resize_sl);
	mlx5_aso_completion_handle(sh);
	if (sq->next == n) {
		/* End of loop: wait 1 second. */
		us = US_PER_S;
		sq->next = 0;
	}
	mlx5_aso_sq_enqueue_burst(sh->aso_age_mng, n);
	if (rte_eal_alarm_set(us, mlx5_flow_aso_alarm, sh))
		DRV_LOG(ERR, "Cannot reinitialize aso alarm.");
}
/**
 * Periodically read CQEs and send WQEs to ASO SQ.
 *
 * @param[in] arg
 *   Shared device context containing the ASO SQ.
 */
Periodically read CQEs and send WQEs to ASO SQ.
@param[in] arg
Shared device context containing the ASO SQ.
Periodically read CQEs and send WQEs to ASO SQ . @param [ in ] arg Shared device context containing the ASO SQ .
static void
mlx5_flow_aso_alarm(void *arg)
{
	struct mlx5_dev_ctx_shared *sh = arg;
	struct mlx5_aso_sq *sq = &sh->aso_age_mng->aso_sq;
	uint32_t us = 100u;
	uint16_t n;
	rte_spinlock_lock(&sh->aso_age_mng->resize_sl);
	n = sh->aso_age_mng->next;
	rte_spinlock_unlock(&sh->aso_age_mng->resize_sl);
	mlx5_aso_completion_handle(sh);
	if (sq->next == n) {
		us = US_PER_S;
		sq->next = 0;
	}
	mlx5_aso_sq_enqueue_burst(sh->aso_age_mng, n);
	if (rte_eal_alarm_set(us, mlx5_flow_aso_alarm, sh))
		DRV_LOG(ERR, "Cannot reinitialize aso alarm.");
}
static void mlx5_flow_aso_alarm ( void * arg ) { struct mlx5_dev_ctx_shared * sh = arg ; struct mlx5_aso_sq * sq = & sh -> aso_age_mng -> aso_sq ; uint32_t us = 100u ; uint16_t n ; rte_spinlock_lock ( & sh -> aso_age_mng -> resize_sl ) ; n = sh -> aso_age_mng -> next ; rte_spinlock_unlock ( & sh -> aso_age_mng -> resize_sl ) ; mlx5_aso_completion_handle ( sh ) ; if ( sq -> next == n ) { us = US_PER_S ; sq -> next = 0 ; } mlx5_aso_sq_enqueue_burst ( sh -> aso_age_mng , n ) ; if ( rte_eal_alarm_set ( us , mlx5_flow_aso_alarm , sh ) ) DRV_LOG ( ERR , " " ) ; }
Periodically read CQEs and send WQEs to ASO SQ.
Periodically read CQEs and send WQEs to ASO SQ .
/* End of loop: wait 1 second. */