From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cm01fe.IST.Berkeley.EDU (cm01fe.IST.Berkeley.EDU [169.229.218.142]) by dpdk.org (Postfix) with ESMTP id 6AD3658D2 for ; Mon, 27 Jan 2014 03:55:18 +0100 (CET) Received: from mail-ve0-f171.google.com ([209.85.128.171]) by cm01fe.ist.berkeley.edu with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.76) (auth plain:sangjin@berkeley.edu) (envelope-from ) id 1W7cNF-0000Xd-3y for dev@dpdk.org; Sun, 26 Jan 2014 18:56:34 -0800 Received: by mail-ve0-f171.google.com with SMTP id pa12so3162050veb.2 for ; Sun, 26 Jan 2014 18:56:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:date:message-id:subject:from:to:content-type; bh=PoRhFOQ61zv5QrMOZpafzB8dEtX+YjFys9aA2894EnQ=; b=FoObr3rf9aIBUaf6EEXahVE5qdhSvCC78gsPolgtd7mPf96XzcT9J30+7DPloPopjC /OqeKDr48hWm2srARlQJEan3TOtovvXu/SmBra6FbtzOwb65TWZbFLBbvbNQdDjAaeFC YWYXiS6kZTwoiJjVXgZ9QbVmz0enryuU7fEJfFMNP5O48B09J/eRPCQKxjTulVONizp+ 7gpfnVOawdniJH772klxJGBg7NE/tO3thO5YPiFoxf3pyudc1A4+YU6riInIIwUu/Xr2 N0Ae0/vm2qQH3RP6gxZLOnzAxe3C5F5g2ezx6jT2ZNuBmfBnU0+WZc0FasNn8CX1+z6s ZMCw== MIME-Version: 1.0 X-Received: by 10.220.97.145 with SMTP id l17mr29879vcn.35.1390791392261; Sun, 26 Jan 2014 18:56:32 -0800 (PST) Received: by 10.220.73.137 with HTTP; Sun, 26 Jan 2014 18:56:32 -0800 (PST) Date: Sun, 26 Jan 2014 18:56:32 -0800 Message-ID: From: Sangjin Han To: dev@dpdk.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [dpdk-dev] "No probed ethernet devices" caused by inaccurate msec_delay() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 02:55:18 -0000 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