From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) by dpdk.org (Postfix) with ESMTP id CCBD5156 for ; Wed, 27 Nov 2013 15:05:50 +0100 (CET) Received: by mail-lb0-f180.google.com with SMTP id w6so5346894lbh.39 for ; Wed, 27 Nov 2013 06:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=TANt9aeDzOcMl5Sj6OufjI5r+pPl3pSPg+7bwoMMvwA=; b=orJFhwz8lY+oVRotwpAt8mvHexb8TQmZmLCAidSuEEM+XDCr4JS5aCMXJOihqa2Hw5 aFefwyk12d2pUnvUUtDfE1CZtOQALpzzE0+YPEklBdd8mWvj4PPuiLoACakbkU9gQzQx fEQwgUGHuovfcrBbrZVOlz1UQvWYwXL0bBR0WzqyA+KBF7UMqsoH7xHp793DD0oayaS9 31AyyppX9xHtw6oE9HR5i+YZn4I3FL7ime9CiwtBxA0LfnvvuwlUbsL86vJfsNNr5mfV b+N6ediFHJC32zRGrD1toOYLJ2mfGIHGpupfolLDwTVukRwKsdVffaBL9U0wksLz+BMY dokQ== X-Received: by 10.112.218.74 with SMTP id pe10mr27921266lbc.19.1385561210478; Wed, 27 Nov 2013 06:06:50 -0800 (PST) Received: from [192.168.15.111] ([87.236.23.248]) by mx.google.com with ESMTPSA id bo10sm13934136lbb.16.2013.11.27.06.06.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Nov 2013 06:06:49 -0800 (PST) Message-ID: <5295FC76.70201@gmail.com> Date: Wed, 27 Nov 2013 18:06:46 +0400 From: Dmitry Vyal User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Thomas Monjalon References: <528F4E41.2000405@gmail.com> <201311221348.02307.thomas.monjalon@6wind.com> In-Reply-To: <201311221348.02307.thomas.monjalon@6wind.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:05:51 -0000 Looks like I finally found the reason. After applying this patch I can no longer reproduce the error. diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c index db07789..5f825fa 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c @@ -2347,7 +2347,7 @@ s32 ixgbe_reset_pipeline_82599(struct ixgbe_hw *hw) /* Write AUTOC register with toggled LMS[2] bit and Restart_AN */ IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg ^ IXGBE_AUTOC_LMS_1G_AN); /* 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) On 11/22/2013 04:48 PM, Thomas Monjalon wrote: > Hello, > > 22/11/2013 13:29, Dmitry Vyal : >> EAL: PCI device 0000:02:00.0 on NUMA socket -1 >> EAL: probe driver: 8086:10fb rte_ixgbe_pmd >> EAL: PCI memory mapped at 0x7f6b83687000 >> EAL: PCI memory mapped at 0x7f6b83683000 >> EAL: PCI device 0000:02:00.1 on NUMA socket -1 >> EAL: probe driver: 8086:10fb rte_ixgbe_pmd >> EAL: PCI memory mapped at 0x7f6b83663000 >> EAL: PCI memory mapped at 0x7f6b8365f000 > [...] >> EAL: Error - exiting with code: 1 >> Cause: No Ethernet ports - bye >> >> Any ideas how to investigate this? > Could you try this patch in order to see the root cause of your issue ? > > --- a/lib/librte_pmd_ixgbe/ixgbe_logs.h > +++ b/lib/librte_pmd_ixgbe/ixgbe_logs.h > @@ -34,41 +34,44 @@ > #ifndef _IXGBE_LOGS_H_ > #define _IXGBE_LOGS_H_ > > +#define PMD_LOG(level, fmt, args...) \ > + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) > + > #ifdef RTE_LIBRTE_IXGBE_DEBUG_INIT > -#define PMD_INIT_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > +#define PMD_INIT_LOG(level, fmt, args...) PMD_LOG(level, fmt, ##args) > #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") > #else > -#define PMD_INIT_LOG(level, fmt, args...) do { } while(0) > +#define PMD_INIT_LOG(level, fmt, args...) \ > + (void)(RTE_LOG_##level <= RTE_LOG_ERR ? PMD_LOG(level, fmt, ##args) : 0) > #define PMD_INIT_FUNC_TRACE() do { } while(0) > #endif > > #ifdef RTE_LIBRTE_IXGBE_DEBUG_RX > -#define PMD_RX_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > +#define PMD_RX_LOG(level, fmt, args...) PMD_LOG(level, fmt, ##args) > #else > -#define PMD_RX_LOG(level, fmt, args...) do { } while(0) > +#define PMD_RX_LOG(level, fmt, args...) \ > + (void)(RTE_LOG_##level <= RTE_LOG_ERR ? PMD_LOG(level, fmt, ##args) : 0) > #endif > > #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX > -#define PMD_TX_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > +#define PMD_TX_LOG(level, fmt, args...) PMD_LOG(level, fmt, ##args) > #else > -#define PMD_TX_LOG(level, fmt, args...) do { } while(0) > +#define PMD_TX_LOG(level, fmt, args...) \ > + (void)(RTE_LOG_##level <= RTE_LOG_ERR ? PMD_LOG(level, fmt, ##args) : 0) > #endif > > #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX_FREE > -#define PMD_TX_FREE_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > +#define PMD_TX_FREE_LOG(level, fmt, args...) PMD_LOG(level, fmt, ##args) > #else > -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0) > +#define PMD_TX_FREE_LOG(level, fmt, args...) \ > + (void)(RTE_LOG_##level <= RTE_LOG_ERR ? PMD_LOG(level, fmt, ##args) : 0) > #endif > > #ifdef RTE_LIBRTE_IXGBE_DEBUG_DRIVER > -#define PMD_DRV_LOG(level, fmt, args...) \ > - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) > +#define PMD_DRV_LOG(level, fmt, args...) PMD_LOG(level, fmt, ##args) > #else > -#define PMD_DRV_LOG(level, fmt, args...) do { } while(0) > +#define PMD_DRV_LOG(level, fmt, args...) \ > + (void)(RTE_LOG_##level <= RTE_LOG_ERR ? PMD_LOG(level, fmt, ##args) : 0) > #endif > > #endif /* _IXGBE_LOGS_H_ */ >