From: "Wiles, Keith" <keith.wiles@intel.com>
To: Shankari Vaidyalingam <shankari.v2k6@gmail.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Memory issues seen while running pktgen with DPDK sample application
Date: Sun, 8 Mar 2015 22:11:04 +0000 [thread overview]
Message-ID: <D1222C0A.163D9%keith.wiles@intel.com> (raw)
In-Reply-To: <CAGeyXNdt_5_kWWgPsLYXAkyXgO5GKRnpZkhBjprLe6dRrg=q3g@mail.gmail.com>
Hi Shankari,
Please show the command lines you are using for the two applications.
On 3/8/15, 11:10 AM, "Shankari Vaidyalingam" <shankari.v2k6@gmail.com>
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® 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
>=====================
><none>
>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
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²
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 Œpg¹ for Pktgen and you could
leave the option off the other other application, but I would add one like
‹file-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=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
next prev parent reply other threads:[~2015-03-08 22:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 16:10 Shankari Vaidyalingam
2015-03-08 22:11 ` Wiles, Keith [this message]
2015-03-08 22:13 ` Wiles, Keith
2015-03-09 11:13 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D1222C0A.163D9%keith.wiles@intel.com \
--to=keith.wiles@intel.com \
--cc=dev@dpdk.org \
--cc=shankari.v2k6@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).