Hi,

I encountered this error message when I tried to use the testpmd application.

Cause: No probed ethernet devices - check that
CONFIG_RTE_LIBRTE_IGB_PMD=y and that CONFIG_RTE_LIBRTE_EM_PMD=y and
that CONFIG_RTE_LIBRTE_IXGBE_PMD=y in your configuration file

which is caused by rte_eth_dev_count() == 0. However, my 82599 ports
are already unbound from ixgbe. (I have two Xeon X5560 (@ 2.80GHz)
processors and two X520-DA2 cards).

I googled for possible causes and came across a similar case:
http://openetworking.blogspot.com/2014/01/debugging-no-probed-ethernet-devices.html

Based on the article, I dug into the source code, and found the cause:

ixgbe_82599.c: ixgbe_reset_pipeline_82599()
...
for (i = 0; i < 10; i++) {
        msec_delay(4);
        anlp1_reg = IXGBE_READ_REG(hw, IXGBE_ANLP1);
        if (anlp1_reg & IXGBE_ANLP1_AN_STATE_MASK)
                break;
}

if (!(anlp1_reg & IXGBE_ANLP1_AN_STATE_MASK)) {
        DEBUGOUT("auto negotiation not completed\n");
        ret_val = IXGBE_ERR_RESET_FAILED;
        goto reset_pipeline_out;
}
...

The number of iterations (== 10) in the for loop was not enough. In my
case, it needed to be at least 12, then everything worked fine.

The issue was that msec_delay() is not very accurate on my system.
While it reads the CPU Hz info from /proc/cpuinfo, it may not reflect
the actual TSCs/sec. Since I did not disable the P-State feature ,
/proc/cpuinfo reports 1.6GHz, but my TSC counter is 2.8GHz. As a
result, msec_delay(4) only waited 2.x milliseconds, which in turn
causes the failure.

I think /proc/cpuinfo is not a reliable way to get
eal_tsc_resolution_hz, since it varies based on the current CPU clock
frequency. Enforcing applications to run at the max frequency can be
too restrictive. It would be nice if I can bypass
set_tsc_freq_from_cpuinfo() in set_tsc_freq().

Thanks,
Sangjin

Reply via email to