From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by dpdk.org (Postfix) with ESMTP id F0A6B6942 for ; Sun, 8 Mar 2015 17:10:06 +0100 (CET) Received: by labhs14 with SMTP id hs14so66454406lab.4 for ; Sun, 08 Mar 2015 09:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nad3JahjunVl0yM4B9kndva9NFxVOksN0E96f9Scfww=; b=KfOYUpxtE27N3hkUtBlx2NK+qLZzo9cnYyylgNJlW4sI2fXDyaI9paHfbtIxv9jN9f y9Mmnabu57QHZDzmtbCxjZM9DBj97/qNIuW1FDDPmSR9uMaOZZpQHoKbBAlHGtT7CMOv KhTj9vtH0Qh7/XMoHz6rU/yStKwTKWC4MClQFfqY+wK6U6fJdd5+lTTXxNTM5ARVH+51 Ym8AyryFrJ5FIS25qSERDVvPOom2D/ZMc732iott+yoJDX3jQhkEOZI/+8ZzbWA8W3UX GVDGvQb30aEZjQsoohHmKqOTODUsiiNCCjA34UBpZCocHCQdZNqTDbZUknS3IpdpCVUn yeCA== MIME-Version: 1.0 X-Received: by 10.112.147.104 with SMTP id tj8mr21969810lbb.106.1425831006424; Sun, 08 Mar 2015 09:10:06 -0700 (PDT) Received: by 10.25.214.13 with HTTP; Sun, 8 Mar 2015 09:10:06 -0700 (PDT) Date: Sun, 8 Mar 2015 21:40:06 +0530 Message-ID: From: Shankari Vaidyalingam To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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 16:10:07 -0000 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=C2=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 unreli= able 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=C2=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 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