All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Dmitry Vyal <dmitryvyal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: Sporadic errors while initializing NICs in example applications, dpdk-1.5.0r1
Date: Fri, 22 Nov 2013 13:48:02 +0100	[thread overview]
Message-ID: <201311221348.02307.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <528F4E41.2000405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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_ */

-- 
Thomas

  parent reply	other threads:[~2013-11-22 12:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 12:29 Sporadic errors while initializing NICs in example applications, dpdk-1.5.0r1 Dmitry Vyal
     [not found] ` <528F4E41.2000405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-22 12:48   ` Thomas Monjalon [this message]
     [not found]     ` <201311221348.02307.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-11-27 14:06       ` Dmitry Vyal
     [not found]         ` <5295FC76.70201-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-27 14:10           ` jigsaw
2013-11-27 14:42           ` Thomas Monjalon
     [not found]             ` <201311271542.05288.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-11-28 11:01               ` Richardson, Bruce
     [not found]                 ` <59AF69C657FD0841A61C55336867B5B01A9781FC-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-11-29 10:53                   ` Dmitry Vyal
     [not found]                     ` <52987236.3020707-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-29 12:25                       ` Thomas Monjalon
2013-11-29 12:39                         ` Thomas Monjalon
2013-12-06 12:43                           ` Dmitry Vyal
2013-11-29 18:20                         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201311221348.02307.thomas.monjalon@6wind.com \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=dmitryvyal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.