From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) by dpdk.org (Postfix) with ESMTP id 009D6156 for ; Wed, 27 Nov 2013 15:09:27 +0100 (CET) Received: by mail-lb0-f177.google.com with SMTP id w7so5308713lbi.8 for ; Wed, 27 Nov 2013 06:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tIwnpeE+vhIoLYzzA9PShL5wtm/XyG1FUv+pVIKw/fY=; b=dkHUWOMUZpy1qR31O1siKR1Ygf9T10I5q6uELG2rgBvLmVu5wuvgZ65q9XW5al6Bb3 /a9D8MDczm+LO4PejxZCU7DZjXiDhXfrRRo5XMoFbkgkZ+ScPibKnb6HAwEJ1kzW3kg/ PwDNRsvSd8ouzaYEXFBwuHAteOHQLqzLZYMeg0obcingfKNpB7HqQtwXe21q03j0C+kI Wy+6T40Iktg2ZJl9HcRKC/2N4p9clpGoh3rlZ1eQlVFi6PdJzJ+DYshmrVGhLdTsQkS6 N5AEN6YH/HHqjqYr5qw9aJ9ZtFm87TsNgnLzw5Tqz+vqW7ZWFcvFAySGoOz2y/jXixkC TCQw== MIME-Version: 1.0 X-Received: by 10.112.210.136 with SMTP id mu8mr12429359lbc.25.1385561427765; Wed, 27 Nov 2013 06:10:27 -0800 (PST) Received: by 10.114.19.103 with HTTP; Wed, 27 Nov 2013 06:10:27 -0800 (PST) In-Reply-To: <5295FC76.70201@gmail.com> References: <528F4E41.2000405@gmail.com> <201311221348.02307.thomas.monjalon@6wind.com> <5295FC76.70201@gmail.com> Date: Wed, 27 Nov 2013 16:10:27 +0200 Message-ID: From: jigsaw To: Dmitry Vyal Content-Type: text/plain; charset=ISO-8859-1 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:09:28 -0000 I had exactly same problem and fixed it with same patch since release 1.4. But somehow it stopped to appear even without the patch. I have no idea what I have done since both the kernel and the driver have been updated during these days. On Wed, Nov 27, 2013 at 4:06 PM, Dmitry Vyal wrote: > 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_ */ >> >