From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com [209.85.215.171]) by dpdk.org (Postfix) with ESMTP id BC1A5156 for ; Wed, 27 Nov 2013 15:41:10 +0100 (CET) Received: by mail-ea0-f171.google.com with SMTP id h10so4840922eak.30 for ; Wed, 27 Nov 2013 06:42:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=IUq5JRDXXlB+CaPRoDQ1RmSPu5IqI0ZCXu/bK57LbOk=; b=Iy70lNK2TI639OiBboxmmrm28ma7mbOLVEw/dAI2PUBxThApAM4rhp/3rZaIIvbe6t wBTp8tvzJSw9El+GIoC/s3EJtrpn8phP8bin4liUp3hQEsV/RV2vc7thFiW8+vQiGGIs iw+EVqNufAa33QqnAu5T4vdWIAGqxjEacw1t0MqOEzNUSRGBpgTgYPyn9/79LPZ39U+w EAkbunPM2QBKkNTEVu6i8Sh6rUuEn7+33Btiy0OyqC143SSSJzH0i7VwiphRb+RDDeGS 3dvjpRfBLfGP0j1vGPOjsIx1uYcYJxWbF0uGrp0oBFT+oU+x+j/pgHICJsOB+vPNfHxu IttA== X-Gm-Message-State: ALoCoQnKvQ79jnxJGn3lFulrFS4GKQPOGoZdXTWPLNrCJd4V2NdVzO6eWBVred98qyilqkFWM+zD X-Received: by 10.14.218.69 with SMTP id j45mr17240241eep.22.1385563330962; Wed, 27 Nov 2013 06:42:10 -0800 (PST) Received: from angus.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id n1sm20251382eep.20.2013.11.27.06.42.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Nov 2013 06:42:10 -0800 (PST) From: Thomas Monjalon Organization: 6WIND To: Dmitry Vyal Date: Wed, 27 Nov 2013 15:42:05 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: <528F4E41.2000405@gmail.com> <201311221348.02307.thomas.monjalon@6wind.com> <5295FC76.70201@gmail.com> In-Reply-To: <5295FC76.70201@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201311271542.05288.thomas.monjalon@6wind.com> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Sporadic errors while initializing NICs in example applications, dpdk-1.5.0r1 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: Wed, 27 Nov 2013 14:41:11 -0000 27/11/2013 15:06, Dmitry Vyal : > Looks like I finally found the reason. After applying this patch I can > no longer reproduce the error. > > --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c > +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c > /* Wait for AN to leave state 0 */ > - for (i = 0; i < 10; i++) { > + for (i = 0; i < 100; i++) { > msec_delay(4); > anlp1_reg = IXGBE_READ_REG(hw, IXGBE_ANLP1); > if (anlp1_reg & IXGBE_ANLP1_AN_STATE_MASK) It's probably due to a frequency scaling. The timer based is initialized when DPDK initialize and the CPU can change its frequency, breaking next timers. The fix is to control the CPU frequency. Please try this, without your patch: for g in /sys/devices/system/cpu/*/cpufreq/scaling_governor; do echo performance >$g; done The right fix for applications (examples and testpmd included) could be to call rte_power_init(). Patches are welcomed. Thank you for your analysis -- Thomas