From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 830231E20 for ; Mon, 28 Aug 2017 10:12:47 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 28 Aug 2017 01:12:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,440,1498546800"; d="scan'208";a="305089902" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.221.28]) ([10.237.221.28]) by fmsmga004.fm.intel.com with ESMTP; 28 Aug 2017 01:12:44 -0700 To: Ming Fu , "users@dpdk.org" References: <30dd191ff8994d9e9eaf57faba77ebc0@mbx01cmb01p.esentire.local> From: Sergio Gonzalez Monroy Message-ID: <7916c4fb-311b-9c59-26a0-a71324b89536@intel.com> Date: Mon, 28 Aug 2017 09:12:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <30dd191ff8994d9e9eaf57faba77ebc0@mbx01cmb01p.esentire.local> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 08:12:48 -0000 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