DPDK usage discussions
 help / color / mirror / Atom feed
From: Ming Fu <Ming.Fu@esentire.com>
To: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>,
	"users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] How to use --virtaddr for multi-process client app.
Date: Mon, 28 Aug 2017 18:53:03 +0000	[thread overview]
Message-ID: <d977e280ac2f4b4bb99b5aa44744cf35@mbx01cmb01p.esentire.local> (raw)
In-Reply-To: <7916c4fb-311b-9c59-26a0-a71324b89536@intel.com>

This really helps, the --base-virtaddr should applied to the mp_server application.

Ming

-----Original Message-----
From: Sergio Gonzalez Monroy [mailto:sergio.gonzalez.monroy@intel.com] 
Sent: August-28-17 4:13 AM
To: Ming Fu <Ming.Fu@esentire.com>; users@dpdk.org
Subject: Re: [dpdk-users] How to use --virtaddr for multi-process client app.

Hi Ming,

If you have ASLR enabled, every time you run an application the dynamic linker (ie. ld-linux) uses different addresses for the process mappings.
Basically the problem here is that the primary DPDK process creates a mapping for shared huge pages and the secondary process tries to map those shared huge pages in the same VMA as the primary process.
If there is already a mapping in the requested VMA, it fails with the error you are getting.
The --base-virtaddr option is only useful if you *disable* ASLR so the mappings are deterministic. Thus, you could find which VMA is free in both processes.

Another "option" is to just keep executing the client application until it works. As you can imagine, it is not a very reliable solution but avoids disabling ASLR.

Thanks,
Sergio

On 23/08/2017 19:35, Ming Fu wrote:
> This is my first try on dpdk. I attached a snort process as an multi-process client similar to the client in the client-server example. The snort receives mbuf from the server process through a dpdk ring. A skeleton client worked, but once linked to snort, it failed in rte_eal_init().
>
> EAL: Detected 48 lcore(s)
> EAL: RTE Version: 'DPDK 17.08.0'
> PANIC in rte_eal_config_reattach():
> Cannot mmap memory for rte_config at [0x7ffff7faf000], got 
> [0x7fffdea94000] - please use '--base-virtaddr' option
>
> Strace show that the mmap() returns a different address than requested. What address should I set the -base-virtaddr to? Is there a way to avoid this kind of problem in general?
>
> Thanks,
> Ming

      reply	other threads:[~2017-08-28 18:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 18:35 Ming Fu
2017-08-28  8:12 ` Sergio Gonzalez Monroy
2017-08-28 18:53   ` Ming Fu [this message]

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=d977e280ac2f4b4bb99b5aa44744cf35@mbx01cmb01p.esentire.local \
    --to=ming.fu@esentire.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    --cc=users@dpdk.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 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).