src/dpdk/drivers/net/ixgbe/ixgbe_ethdev.c
static int
ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
{
#ifdef RTE_EXEC_ENV_FREEBSD
	int err, i;
	bool link_up = false;
	uint32_t speed = 0;
	const int nb_iter = 25;

	for (i = 0; i < nb_iter; i++) {
		err = ixgbe_check_link(hw, &speed, &link_up, 0);
		if (err)
			return err;
		if (link_up)
			return 0;
		msec_delay(200);
	}

	return 0;
#else
	RTE_SET_USED(hw);
	return 0;
#endif
}
/*
 * In freebsd environment, nic_uio drivers do not support interrupts,
 * rte_intr_callback_register() will fail to register interrupts.
 * We can not make link status to change from down to up by interrupt
 * callback. So we need to wait for the controller to acquire link
 * when ports start.
 * It returns 0 on link up.
 */
In freebsd environment, nic_uio drivers do not support interrupts,
rte_intr_callback_register() will fail to register interrupts.
We can not make link status to change from down to up by interrupt
callback. So we need to wait for the controller to acquire link
when ports start.
It returns 0 on link up.
In freebsd environment nic_uio drivers do not support interrupts rte_intr_callback_register () will fail to register interrupts . We can not make link status to change from down to up by interrupt callback . So we need to wait for the controller to acquire link when ports start . It returns 0 on link up .
static int
ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
{
#ifdef RTE_EXEC_ENV_FREEBSD
	int err, i;
	bool link_up = false;
	uint32_t speed = 0;
	const int nb_iter = 25;
	for (i = 0; i < nb_iter; i++) {
		err = ixgbe_check_link(hw, &speed, &link_up, 0);
		if (err)
			return err;
		if (link_up)
			return 0;
		msec_delay(200);
	}
	return 0;
#else
	RTE_SET_USED(hw);
	return 0;
#endif
}
static int ixgbe_wait_for_link_up ( struct ixgbe_hw * hw ) { #ifdef RTE_EXEC_ENV_FREEBSD int err , i ; bool link_up = false ; uint32_t speed = 0 ; const int nb_iter = 25 ; for ( i = 0 ; i < nb_iter ; i ++ ) { err = ixgbe_check_link ( hw , & speed , & link_up , 0 ) ; if ( err ) return err ; if ( link_up ) return 0 ; msec_delay ( 200 ) ; } return 0 ; #else RTE_SET_USED ( hw ) ; return 0 ; #endif }
In freebsd environment, nic_uio drivers do not support interrupts,
 rte_intr_callback_register() will fail to register interrupts.
In freebsd environment nic_uio drivers do not support interrupts rte_intr_callback_register () will fail to register interrupts .