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" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Sporadic errors while initializing NICs in example applications, dpdk-1.5.0r1
Date: Fri, 29 Nov 2013 13:25:43 +0100	[thread overview]
Message-ID: <3439195.NJQbpGS54N@x220> (raw)
In-Reply-To: <52987236.3020707@gmail.com>

29/11/2013 14:53, Dmitry Vyal :
> On 11/28/2013 03:01 PM, Richardson, Bruce wrote:
> >> 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.
> > 
> > [BR] Frequency changes should not affect timers for modern Intel CPUs.
> > Please see the " Intel(r) 64 and IA-32 Architectures Software Developer's
> > Manual" Volume 3
> > (http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-i
> > a-32-architectures-software-developer-system-programming-manual-325384.pdf
> > ) , Section 17.13 for more details on this.
>
> Hmm, that's strange. I don't know how to interpret my observations then.
> I have access to two platforms, one is based on Intel(R) Xeon(R) CPU
> E3-1230 V2 @ 3.30GHz and another on Intel(R) Xeon(R) CPU E3-1270 v3 @
> 3.50GHz. Both running ubuntu-12.04 server. I see repeating errors on NIC
> initialisation phase. The error frequency greatly reduces if I patch
> loop limit as I described earlier or if I call rte_power_init and
> rte_power_freq_max as Thomas suggested.
>
> But the only way to get rid of them completely is to set performance
> governor.

Please check that your hardware do not support invariant TSC.
It would explain why you need to fix frequency.

I attach a simple code to test CPU feature "Invariant TSC".

-- 
Thomas
From elevran@gmail.com  Fri Nov 29 13:30:07 2013
Return-Path: <elevran@gmail.com>
Received: from mail-we0-x233.google.com (mail-we0-x233.google.com
 [IPv6:2a00:1450:400c:c03::233])
 by dpdk.org (Postfix) with ESMTP id 05CBA5957
 for <dev@dpdk.org>; Fri, 29 Nov 2013 13:30:06 +0100 (CET)
Received: by mail-we0-f179.google.com with SMTP id q59so9138233wes.24
 for <dev@dpdk.org>; Fri, 29 Nov 2013 04:31:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:references:in-reply-to:subject:date:message-id
 :mime-version:content-type:content-transfer-encoding:thread-index
 :content-language;
 bh=YgCCovryZzq6ddtzTpobh+UluwKbC5L79otuZIxexDo=;
 b=QwbRWGBva7n9G7iJie7XwNIyS5w1aUpCfsW6K3cJbMErnf4fqQyFDVh+hrnIy1+PQs
 yz3m19LaUk9PTzSV+IAUsdMgRP+vVNjqHlnQJaVf1SnMSgCeuZ6IbNpQZXhWjnOgpYtr
 CgjIrbwSoeq6HKXH3vsbi/m+QJXTQuQVy3jLIN+TQGB8YcEcycgk3XQeV9LforTelJkZ
 +Xzvjner6ld+Endb+ZflPcZjiSYXMtjqc7ZnVAdm39tJcQoOF4Yq/dHInLThgFmwE+GJ
 g7xGqxZ/NR3yijoiIlgeZd2xvTIUJ817CiOtoNkWg0NRqCDOIOOe4OKNa7L/lzLRkx8l
 8tfA==
X-Received: by 10.180.90.141 with SMTP id bw13mr6711636wib.40.1385728267606;
 Fri, 29 Nov 2013 04:31:07 -0800 (PST)
Received: from elevranwin7 (85.64.123.135.dynamic.barak-online.net.
 [85.64.123.135])
 by mx.google.com with ESMTPSA id a19sm91468131wib.1.2013.11.29.04.31.04
 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Fri, 29 Nov 2013 04:31:06 -0800 (PST)
From: "Etai Lev-Ran" <elevran@gmail.com>
To: "'Surya Nimmagadda'" <nscsekhar@juniper.net>
References: <20d8915bacb140d5a7a02e45f0093c3f@CO1PR05MB284.namprd05.prod.outlook.com>
 <52987205.4050507@bisdn.de>
In-Reply-To: <52987205.4050507@bisdn.de>
Date: Fri, 29 Nov 2013 14:31:12 +0200
Message-ID: <019601ceecfe$e5304fc0$af90ef40$@com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-index: Ac7s8RhXRr3criIyS9m8QQASzSCIUAADIISg
Content-language: en-us
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Unable to build dpdk : #error "SSSE3 instruction set
	not enabled"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Nov 2013 12:30:07 -0000

Hi Surya,

SSE3 instructions are not enabled by default. 
To enable, you can either tell gcc your CPU architecture (-march=<arch>) as
suggested
by Marc, or enable just the specific SSE version that's supported by your
CPU (e.g.,
make TOOLCHAIN_CFLAGS="-msse4")

See http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html for a
list of CPU
architectures and instruction flags.

Regards,
Etai

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Marc Sune
Sent: Friday, November 29, 2013 12:53 PM
To: dev@dpdk.org
Subject: Re: [dpdk-dev] Unable to build dpdk : #error "SSSE3 instruction set
not enabled"

Changing the CPU type emulation to some model that supports SSSE3 solved it
(e.g. core2duo) should do the trick. I faced the same problem sometime ago.

best
marc

On 29/11/13 11:39, Surya Nimmagadda wrote:
> Hi,
>
> I am a beginner with dpdk and trying to follow the instructions in 
> http://www.dpdk.org/doc/quick-start
>
> I am seeing the following error when doing make with 1.5.0r2 or 
> 1.5.1r1
>
> == Build lib/librte_meter
> == Build lib/librte_sched
>    CC rte_sched.o
> In file included from
/home/surya/dpdk/dpdk-1.5.1r1/lib/librte_sched/rte_bitmap.h:77:0,
>                   from
/home/surya/dpdk/dpdk-1.5.1r1/lib/librte_sched/rte_sched.c:47:
> /usr/lib/gcc/x86_64-linux-gnu/4.6/include/tmmintrin.h:31:3: error: #error
"SSSE3 instruction set not enabled"
> make[3]: *** [rte_sched.o] Error 1
> make[2]: *** [librte_sched] Error 2
> make[1]: *** [lib] Error 2
> make: *** [all] Error 2
>
> I am running this on a Ubuntu VM (12.04) with gcc version 4.6.3
>
> It built fine on another vm where I have Ubuntun 13.10 with gcc 
> version 4.8.1
>
> Should I upgrade to 4.8.1 here as well (it has become a long process with
lot of road blocks) or is there any simple fix?
>
> The DPDK doc says I just need gcc versions 4.5.x or later.
>
> Thanks,
> Surya
>

  reply	other threads:[~2013-11-29 12:23 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
2013-11-28 11:01       ` Richardson, Bruce
2013-11-29 10:53         ` Dmitry Vyal
2013-11-29 12:25           ` Thomas Monjalon [this message]
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=3439195.NJQbpGS54N@x220 \
    --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).