[dpdk-users] How to use --virtaddr for multi-process client app.
Sergio Gonzalez Monroy
sergio.gonzalez.monroy at intel.com
Mon Aug 28 10:12:44 CEST 2017
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
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.
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?
More information about the users