DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Dmitry Vyal <dmitryvyal@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Sporadic errors while initializing NICs in example applications, dpdk-1.5.0r1
Date: Wed, 27 Nov 2013 15:42:05 +0100	[thread overview]
Message-ID: <201311271542.05288.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <5295FC76.70201@gmail.com>

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

  parent reply	other threads:[~2013-11-27 14:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 12:29 Dmitry Vyal
2013-11-22 12:48 ` Thomas Monjalon
2013-11-27 14:06   ` Dmitry Vyal
2013-11-27 14:10     ` jigsaw
2013-11-27 14:42     ` Thomas Monjalon [this message]
2013-11-28 11:01       ` Richardson, Bruce
2013-11-29 10:53         ` Dmitry Vyal
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=201311271542.05288.thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=dmitryvyal@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).