From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.esentire.com (unknown [52.129.34.132]) by dpdk.org (Postfix) with ESMTP id CE36E1B53 for ; Mon, 28 Aug 2017 20:53:04 +0200 (CEST) Received: from exchange.esentire.com (cas01colo01p.internal [10.1.120.115]) by mail.esentire.com (Postfix) with ESMTPS id 53C421801BB; Mon, 28 Aug 2017 18:53:04 +0000 (UTC) Received: from mbx01cmb01p.esentire.local (10.1.120.118) by mbx02cmb01p.esentire.local (10.1.120.125) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 28 Aug 2017 14:53:04 -0400 Received: from mbx01cmb01p.esentire.local ([fe80::814b:946e:3026:96c9]) by mbx01cmb01p.esentire.local ([fe80::814b:946e:3026:96c9%14]) with mapi id 15.00.1210.000; Mon, 28 Aug 2017 14:53:04 -0400 From: Ming Fu To: Sergio Gonzalez Monroy , "users@dpdk.org" Thread-Topic: [dpdk-users] How to use --virtaddr for multi-process client app. Thread-Index: AdMcPdA2mP2B2xprSRO9aBHzEj0V9gDuSPIAAA3wpYA= Date: Mon, 28 Aug 2017 18:53:03 +0000 Message-ID: References: <30dd191ff8994d9e9eaf57faba77ebc0@mbx01cmb01p.esentire.local> <7916c4fb-311b-9c59-26a0-a71324b89536@intel.com> In-Reply-To: <7916c4fb-311b-9c59-26a0-a71324b89536@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.1.120.131] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] How to use --virtaddr for multi-process client app. X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2017 18:53:06 -0000 This really helps, the --base-virtaddr should applied to the mp_server appl= ication. Ming -----Original Message----- From: Sergio Gonzalez Monroy [mailto:sergio.gonzalez.monroy@intel.com]=20 Sent: August-28-17 4:13 AM To: Ming Fu ; users@dpdk.org Subject: Re: [dpdk-users] How to use --virtaddr for multi-process client ap= p. Hi Ming, If you have ASLR enabled, every time you run an application the dynamic lin= ker (ie. ld-linux) uses different addresses for the process mappings. Basically the problem here is that the primary DPDK process creates a mappi= ng for shared huge pages and the secondary process tries to map those share= d 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 mapp= ings are deterministic. Thus, you could find which VMA is free in both proc= esses. 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 di= sabling 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-proc= ess client similar to the client in the client-server example. The snort re= ceives 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=20 > [0x7fffdea94000] - please use '--base-virtaddr' option > > Strace show that the mmap() returns a different address than requested. W= hat address should I set the -base-virtaddr to? Is there a way to avoid thi= s kind of problem in general? > > Thanks, > Ming