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 C3A819AA1 for ; Sun, 8 Mar 2015 23:11:07 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 08 Mar 2015 15:11:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,364,1422950400"; d="scan'208";a="688856141" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga002.fm.intel.com with ESMTP; 08 Mar 2015 15:11:06 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 8 Mar 2015 15:11:06 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by ORSMSX151.amr.corp.intel.com (10.22.226.38) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 8 Mar 2015 15:11:06 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.22]) by FMSMSX112.amr.corp.intel.com ([10.18.116.6]) with mapi id 14.03.0195.001; Sun, 8 Mar 2015 15:11:05 -0700 From: "Wiles, Keith" To: Shankari Vaidyalingam , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Memory issues seen while running pktgen with DPDK sample application Thread-Index: AQHQWezF4Inv9zA8VUyCRt8IW5ynXw== Date: Sun, 8 Mar 2015 22:11:04 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.36.212] Content-Type: text/plain; charset="Windows-1252" Content-ID: <2BC59966D310564B8329509A56D51F33@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Sun, 08 Mar 2015 22:11:08 -0000 Hi Shankari, Please show the command lines you are using for the two applications. On 3/8/15, 11:10 AM, "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: > >>>>>>>>> > >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=AE 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 =3D 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=3Dyes nonstop_tsc=3Dno -> using >unreliable >clock cycles ! >EAL: Master core 0 is ready (tid=3D4fd54800) >EAL: Core 1 is ready (tid=3D2c7fe700) >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=AE 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=3Dauto 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 >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >0000:00:08.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=3Digb_uio >unused=3De1000 >0000:00:09.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=3Digb_uio >unused=3De1000 > >Network devices using kernel driver >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >0000:00:0a.0 '82545EM Gigabit Ethernet Controller (Copper)' if=3Deth4 >drv=3De1000 unused=3Digb_uio >0000:00:11.0 '82545EM Gigabit Ethernet Controller (Copper)' if=3Deth2 >drv=3De1000 unused=3Digb_uio *Active* > >Other network devices >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >controller@controller-VirtualBox:~/dpdk-1.7.1/examples/exception_path$ >sudo >./build/exception_path -c 0x03 -n 2 --proc-type=3Dauto -- -p 0x01 -i 2 -o = 1 These are just examples and may not run as expected: ./build/exception_path -c 0x03 -n 2 --proc-type auto --socket-mem 256,256 --file-prefix ex -- -p 0x01 -i 2 -o 1 ./build/pktgen -c 0x1f0 -n 3 --proc-type auto --socket-mem 256,256 --file-prefix pg -- -p 0x00c -P -m "[1:3].0, [2:4].1=B2 You need to make sure you use . different cores for each application. . --proc-type auto on both, start one of the applications first to define it as the master. . --file-prefix XXX to force DPDK to use different files in the /mnt/huge directories. The XXX is the file prefix say =8Cpg=B9 for Pktgen and you cou= ld leave the option off the other other application, but I would add one like =8Bfile-prefix ex . --socket-mem X,Y to split up the memory for each application. If you have two sockets and 1024 huge pages allocated in the system then use --socket-mem 512,512 for each application. You can have one application with more or less then the other application. If you have one socket then --socket-mem X on one then --socket-mem Y on the other. . split up the ports between the applications as well, it is not easy to share a port unless you want to design the applications as a true master/secondary processes. >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=3Dauto -- -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]] > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >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 =3D 1 ># ># Do not send ICMP redirects (we are not a router) >#net.ipv4.conf.all.send_redirects =3D 0 ># ># Do not accept IP source route packets (we are not a router) >#net.ipv4.conf.all.accept_source_route =3D 0 >#net.ipv6.conf.all.accept_source_route =3D 0 ># ># Log Martian Packets >#net.ipv4.conf.all.log_martians =3D 1 ># > >vm.nr_hugepages=3D1024 > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > > >Regards >Shankari.V