From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6D5779A8F for ; Mon, 9 Mar 2015 12:13:41 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 09 Mar 2015 04:13:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,367,1422950400"; d="scan'208";a="538013594" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.26]) by orsmga003.jf.intel.com with SMTP; 09 Mar 2015 04:13:10 -0700 Received: by (sSMTP sendmail emulation); Mon, 09 Mar 2015 11:13:37 +0025 Date: Mon, 9 Mar 2015 11:13:36 +0000 From: Bruce Richardson To: Shankari Vaidyalingam Message-ID: <20150309111336.GB960@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Memory issues seen while running pktgen with DPDK sample application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2015 11:13:42 -0000 On Sun, Mar 08, 2015 at 09:40:06PM +0530, Shankari Vaidyalingam wrote: > Hi, > > I'm trying to send packets from pktgen to exception path sample application. > My configuration is like this: > > |------Terminal 1------- -------Terminal 2------------ > | | | > | > | Pktgen |------> NIC port 0 --|--->tap0 --> Appln --->tap1| > | | > |---------------------------------| > |----------------------- > Tried the following but getting an error with memory fault: > > > Pktgen: Started this first > Exception path sample application: When I started this I got the error: > Please let me know how to resolve this error: > As well as limiting memory, you also need to provide a different hugepage filename prefix for each independent DPDK process you are running on the system. See: http://dpdk.org/doc/guides/prog_guide/multi_proc_support.html#running-multiple-independent-dpdk-applications Regards, /Bruce > >>>>>>>> > > sudo ./build/exceptiopath -c 0x03 -n 2 -- -p 0x01 -i 2 -o 1 > [sudo] password for controller: > EAL: Detected lcore 0 as core 0 on socket 0 > EAL: Detected lcore 1 as core 1 on socket 0 > EAL: Support maximum 64 logical core(s) by configuration. > EAL: Detected 2 lcore(s) > EAL: No free hugepages reported in hugepages-2048kB > PANIC in rte_eal_init(): > Cannot get hugepage information > 6: [./build/exception_path() [0x418cc5]] > 5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) > [0x7fda2c77976d]] > 4: [./build/exception_path(main+0x39) [0x4183e9]] > 3: [./build/exception_path(rte_eal_init+0x10ac) [0x45f8ac]] > 2: [./build/exception_path(__rte_panic+0xc1) [0x41824a]] > 1: [./build/exception_path(rte_dump_stack+0x23) [0x466013]] > > >>>>>>>> > > Then I tried the following steps > > (2) Started the sample path application first > Pktgen next I got the below error: > > Pktgen created by: Keith Wiles -- >>> Powered by Intel® DPDK <<< > ----------------------- > EAL: Detected lcore 0 as core 0 on socket 0 > EAL: Detected lcore 1 as core 1 on socket 0 > EAL: Support maximum 64 logical core(s) by configuration. > EAL: Detected 2 lcore(s) > EAL: No free hugepages reported in hugepages-2048kB > PANIC in rte_eal_init(): > Cannot get hugepage information > 6: [./app/build/pktgen() [0x422ba5]] > 5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) > [0x7fb46e0b476d]] > 4: [./app/build/pktgen(main+0x116) [0x422286]] > 3: [./app/build/pktgen(rte_eal_init+0x10ac) [0x4ac4dc]] > 2: [./app/build/pktgen(__rte_panic+0xc1) [0x422007]] > 1: [./app/build/pktgen(rte_dump_stack+0x23) [0x4b2c43]] > > (3) I tried specifying no of pages that both the pktgen and sample > application needs to take by specifying it in commandline in the EAL > options: > But that also didnt work: > > EAL: Virtual area found at 0x7fcff6200000 (size = 0x200000) > EAL: Not enough memory available on socket 1! Requested: 128MB, available: > 0MB > PANIC in rte_eal_init(): > Cannot init memory > 6: [./build/exception_path() [0x418cc5]] > 5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) > [0x7fd0790f876d]] > 4: [./build/exception_path(main+0x39) [0x4183e9]] > 3: [./build/exception_path(rte_eal_init+0x1808) [0x460008]] > 2: [./build/exception_path(__rte_panic+0xc1) [0x41824a]] > 1: [./build/exception_path(rte_dump_stack+0x23) [0x466013]] > > (4) Then I went forward to edit the no of hugepages allocated in the script > /etc/sysctl.conf and then > ran the setup.sh script under the tools dir to allocate hugepages for each > separate application > > This time also I faced issues related to memory running out: > > HugePages: 0 kB > HugePages_Total: 256 > HugePages_Free: 256 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > EAL: Requesting 256 pages of size 2MB from socket 0 > EAL: TSC frequency is ~2689707 KHz > EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable > clock cycles ! > EAL: Master core 0 is ready (tid=4fd54800) > EAL: Core 1 is ready (tid=2c7fe700) > EAL: PCI device 0000:00:08.0 on NUMA socket -1 > EAL: probe driver: 8086:100f rte_em_pmd > EAL: PCI memory mapped at 0x7f894fcfe000 > EAL: PCI device 0000:00:09.0 on NUMA socket -1 > EAL: probe driver: 8086:100f rte_em_pmd > EAL: PCI memory mapped at 0x7f894fcde000 > EAL: PCI device 0000:00:0a.0 on NUMA socket -1 > EAL: probe driver: 8086:100f rte_em_pmd > EAL: 0000:00:0a.0 not managed by UIO driver, skipping > EAL: PCI device 0000:00:11.0 on NUMA socket -1 > EAL: probe driver: 8086:100f rte_em_pmd > EAL: 0000:00:11.0 not managed by UIO driver, skipping > EAL: PCI device 0000:00:0a.0 on NUMA socket -1 > EAL: probe driver: 8086:100f rte_em_pmd > EAL: 0000:00:0a.0 not managed by UIO driver, skipping > EAL: PCI device 0000:00:11.0 on NUMA socket -1 > EAL: probe driver: 8086:100f rte_em_pmd > EAL: 0000:00:11.0 not managed by UIO driver, skipping > APP: Initialising port 0 ... > > Checking link statusdone > Port 0 Link Up - speed 1000 Mbps - full-duplex > APP: Lcore 1 is reading from port 0 and writing to tap_dpdk_01 > APP: Lcore 0 is reading from tap_dpdk_00 and writing to port 0 > > Setting huge pages through execution of setup.sh: > > HugePages: 0 kB > HugePages_Total: 512 > HugePages_Free: 256 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > Press enter to continue ... > > when pktgen is executed the output was: > > Pktgen created by: Keith Wiles -- >>> Powered by Intel® DPDK <<< > ----------------------- > EAL: Detected lcore 0 as core 0 on socket 0 > EAL: Detected lcore 1 as core 1 on socket 0 > EAL: Support maximum 64 logical core(s) by configuration. > EAL: Detected 2 lcore(s) > EAL: Error - exiting with code: 1 > Cause: Cannot create lock on '/var/run/.rte_config'. Is another primary > process running? > > (5) >>>>>> Then I tried with the proc-type=auto to start the app as > secondary process and pktgen as primary process but it gave me the error: > > > >>>>>>>Pktgen was executing successfully > > Then I executed setup.sh to set the no of hugepages for pktgen > > HugePages: 0 kB > HugePages_Total: 1024 > HugePages_Free: 512 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > Network devices using DPDK-compatible driver > ============================================ > 0000:00:08.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio > unused=e1000 > 0000:00:09.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio > unused=e1000 > > Network devices using kernel driver > =================================== > 0000:00:0a.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth4 > drv=e1000 unused=igb_uio > 0000:00:11.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth2 > drv=e1000 unused=igb_uio *Active* > > Other network devices > ===================== > > controller@controller-VirtualBox:~/dpdk-1.7.1/examples/exception_path$ sudo > ./build/exception_path -c 0x03 -n 2 --proc-type=auto -- -p 0x01 -i 2 -o 1 > EAL: Detected lcore 0 as core 0 on socket 0 > EAL: Detected lcore 1 as core 1 on socket 0 > EAL: Support maximum 64 logical core(s) by configuration. > EAL: Detected 2 lcore(s) > EAL: Auto-detected process type: SECONDARY > EAL: Setting up memory... > EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the > kernel. > EAL: This may cause issues with mapping memory into secondary processes > EAL: Analysing 512 files > EAL: Could not open /mnt/huge/rtemap_256 > PANIC in rte_eal_init(): > Cannot init memory > 6: [./build/exception_path() [0x418cc5]] > 5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) > [0x7fa570d0a76d]] > 4: [./build/exception_path(main+0x39) [0x4183e9]] > 3: [./build/exception_path(rte_eal_init+0x1808) [0x460008]] > 2: [./build/exception_path(__rte_panic+0xc1) [0x41824a]] > 1: [./build/exception_path(rte_dump_stack+0x23) [0x466013]] > > (7) Changed the code to have separate execution paths for primary and > secondary processes as per the multi > process application and then executed the code. > I also disabled ASLR temporarily to allow memory allocation for the > secondary process but still I face the below issue: > > controller@controller-VirtualBox:~/dpdk-1.7.1/examples/exception_path$ sudo > ./build/exception_path -c 0x03 -n 2 --proc-type=auto -- -p 0x01 -i 2 -o 1 > EAL: Detected lcore 0 as core 0 on socket 0 > EAL: Detected lcore 1 as core 1 on socket 0 > EAL: Support maximum 64 logical core(s) by configuration. > EAL: Detected 2 lcore(s) > EAL: Auto-detected process type: SECONDARY > EAL: Setting up memory... > EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the > kernel. > EAL: This may cause issues with mapping memory into secondary processes > EAL: Analysing 512 files > EAL: Could not open /mnt/huge/rtemap_256 > PANIC in rte_eal_init(): > Cannot init memory > 6: [./build/exception_path() [0x418cc5]] > 5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) > [0x7fa570d0a76d]] > 4: [./build/exception_path(main+0x39) [0x4183e9]] > 3: [./build/exception_path(rte_eal_init+0x1808) [0x460008]] > 2: [./build/exception_path(__rte_panic+0xc1) [0x41824a]] > 1: [./build/exception_path(rte_dump_stack+0x23) [0x466013]] > > ============================================================= > > Contents of /etc/sysctl.conf in both the cases: > > # Accept ICMP redirects only for gateways listed in our default > # gateway list (enabled by default) > # net.ipv4.conf.all.secure_redirects = 1 > # > # Do not send ICMP redirects (we are not a router) > #net.ipv4.conf.all.send_redirects = 0 > # > # Do not accept IP source route packets (we are not a router) > #net.ipv4.conf.all.accept_source_route = 0 > #net.ipv6.conf.all.accept_source_route = 0 > # > # Log Martian Packets > #net.ipv4.conf.all.log_martians = 1 > # > > vm.nr_hugepages=1024 > > =================================================== > > > Regards > Shankari.V