From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by dpdk.org (Postfix) with ESMTP id 5D09A2BA5 for ; Sun, 18 Mar 2018 18:52:53 +0100 (CET) Received: by mail-lf0-f48.google.com with SMTP id h127-v6so22082155lfg.12 for ; Sun, 18 Mar 2018 10:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=PaePu+B0lPOlWIRUjn/nR5uyM+1ypdzbd1PSRGn46jg=; b=Siruw/LaGGMlRCUgviKokaW7huqmGqdBaK/JR+NWj3VPRYTs/vSY46FTDYvZKKLbkD O04LBb0crjl72o//D9qU3dFkh7qWP4pyjrPFW4XmnWtIIc9ZEHbTHsbRE1TzBMqbLxYh htr5TT1SHUiVOOkrhF5wzUCyFHt+VBI/LPVaK4YPeLx8hrYzm4ewDbFyEC/6NqsJr6ht qErswutkSKU4AjKIw7k3JFMaHqgLCOFOFDe2CPMkkh1mouZj4pRxo0ae/LlsqXrp2ZSM Uf4rb+2HqcOobu7oPCSzFDER8OvZUdh7+M6PtpStrvmBvlM1GFELnblIo0tqL1ij+ps9 Dj0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=PaePu+B0lPOlWIRUjn/nR5uyM+1ypdzbd1PSRGn46jg=; b=qb2IXFxqm+FB2VNl2Hj7aRZLyc3G0GBtTulabw/10Uf5oqnlpjr7Zx7m4uPEpItTBM MgLGd21MqXaqm7qlj3SA4gOSOQb67qhacL6i/ZG/AeuRo7xo/uB033vePpNFwo4JBnUz yzd24S04vbpCDaTBz4e5JPvtBLYXxTYa4bc/ajpaoLrfK5BEDfQo0lZHnkosa7JqxLI7 c4PLrNIYW9iR5doG4aBxwwJL+fQ0KSo6Wk8NO4TjigZZzaDgnAfQPMjVViGk8IcpE9MJ lAT6jfPz9zXJ58R1CB+DDDOX44joOpwvE0a/n62WYlAtz9hHQLaY49XCZhrTxSoa6GxO bvaQ== X-Gm-Message-State: AElRT7HaWQV3DvtZChvc5cTmg6/C/dIpz97vFSGaMQwczHzwj2s3mq97 bSofjci62Ocvabc/2vk/NL2UxEIMbkcLkckml9w= X-Google-Smtp-Source: AG47ELvUJGpxCyqepCWThCEgz/JIGMLEX9Lsf2N+Jk4UdGdevfZ5rXe+kA+NdgF1JD/bDbfJGywrVHJENVcR9HCOK6w= X-Received: by 10.46.68.78 with SMTP id r75mr5997758lja.13.1521395572678; Sun, 18 Mar 2018 10:52:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.134.205 with HTTP; Sun, 18 Mar 2018 10:52:12 -0700 (PDT) In-Reply-To: <9B0331B6EBBD0E4684FBFAEDA55776F953176BCA@HASMSX110.ger.corp.intel.com> References: <9B0331B6EBBD0E4684FBFAEDA55776F953176BCA@HASMSX110.ger.corp.intel.com> From: "RAJESH KUMAR S.R" Date: Sun, 18 Mar 2018 23:22:12 +0530 Message-ID: To: "Rosen, Rami" , users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] [DPDK-PDUMP] Issue: RING: Cannot reserve memory 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: Sun, 18 Mar 2018 17:52:53 -0000 Hi Rami, Thanks for the response. DPDK version I'm using is 18.02.0. The primary process I'm using is custom program which uses dpdk. I have initialized pdump in the primary process using "rte_pdump_init(NULL)" similar to that in testpmd example. I'm using the pdump tool without making any changes. I enabled the following flags 1. CONFIG_RTE_LIBRTE_PDUMP=y 2. CONFIG_RTE_LIBRTE_PMD_PCAP=y I added the libpcap library The problem I'm facing is bit different from what I mentioned earlier. The first time when I run, I'm able to see the packets getting saved in the output pcap file, rx.pcap and tx.pcap. The second time when I run, I'm getting a segmentation fault as I have pasted the output in the previous message. I'm using gdb for debugging, the functions rte_eal_init(), create_mp_ring_vdev(); enable_pdump(); are working fine. The segmentation fault is occuring in rte_eth_tx_burst function(dump_packets ->pdump_rxtx-->rte_eth_tx_burst) The rings tx_ring_0 and rx_ring_0 are not getting freed. I checked that with rte_memzone_dump(). So, next time when I start the pdump tool I was getting " memzone already exists . RING: Cannot reserve memory" error. So, issue is in rte_eth_tx_burst function, where the "dev->data->tx_queues[queue_id]" is NULL. " EAL: Detected lcore 0 as core 0 on socket 0 EAL: Detected lcore 1 as core 0 on socket 0 EAL: Support maximum 128 logical core(s) by configuration. EAL: Detected 2 lcore(s) EAL: Module /sys/module/vfio_pci not found! error 2 (No such file or directory) EAL: VFIO PCI modules not loaded EAL: Multi-process socket /var/run/.rte_unix_1817_14c6748457c5 [New Thread 0x7ffff67d4700 (LWP 1821)] EAL: Probing VFIO support... EAL: Module /sys/module/vfio not found! error 2 (No such file or directory) EAL: VFIO modules not loaded, skipping VFIO support... EAL: Module /sys/module/vfio not found! error 2 (No such file or directory) EAL: Setting up physically contiguous 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 300 files EAL: Mapped segment 0 of size 0x400000 EAL: Mapped segment 1 of size 0x200000 EAL: Mapped segment 2 of size 0x200000 EAL: Mapped segment 3 of size 0x200000 EAL: Mapped segment 4 of size 0x24c00000 EAL: Mapped segment 5 of size 0x200000 EAL: TSC frequency is ~2904192 KHz EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles ! EAL: Master lcore 0 is ready (tid=f7fec8c0;cpuset=[0]) [New Thread 0x7ffff5fd3700 (LWP 1822)] EAL: PCI device 0000:00:03.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1000 net_virtio EAL: PCI Port IO found start=0xc060 EAL: PCI device 0000:00:04.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1000 net_virtio EAL: PCI Port IO found start=0xc080 EAL: PCI device 0000:00:05.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1000 net_virtio EAL: Requested device 0000:00:05.0 cannot be used PMD: Initializing pmd_pcap for net_pcap_rx_0 PMD: Creating pcap-backed ethdev on numa socket -1 PMD: Initializing pmd_pcap for net_pcap_tx_0 PMD: Creating pcap-backed ethdev on numa socket -1 Thread 1 "dpdk-pdump" received signal SIGSEGV, Segmentation fault. 0x000000000043ee07 in rte_eth_tx_burst (port_id=4, queue_id=0, tx_pkts=0x7fffffffe8c0, nb_pkts=1) " I don't know why tx_queues is NULL. I'm currently checking where that is getting populated. Thanks & Regards, Rajesh kumar S R On Sat, Mar 17, 2018 at 9:28 PM, Rosen, Rami wrote: > Hi Rajesh, > > Can you please provide more details: > > - Which DPDK version are you using? > > - dpdk-pdump is a secondary process and must be launched along with > any primary process. Which is the primary process you are running ? > is it something that you developed on your own/took something from DPDK > examples (with/without extending it), etc ? > > Regards, > Rami Rosen > > > -----Original Message----- > From: users [mailto:users-bounces@dpdk.org] On Behalf Of RAJESH KUMAR S.R > Sent: Monday, March 12, 2018 12:25 > To: users@dpdk.org > Subject: [dpdk-users] [DPDK-PDUMP] Issue: RING: Cannot reserve memory > > Hi, > > I am new to dpdk. > I'm trying to use dpdk-pdump tool. I'm able to capture packets on dpdk > ports. > > But, I'm facing the following issue > I'm getting a error "RING:Cannot reserve memory" while trying to restart > the pdump tool or running 2 instances of pdump. > I have also used the rte_eal_cleanup while exiting pdump main function. > > > Output: > * sudo /opt/pep/active/bin/dpdk-pdump -- --pdump > 'port=0,queue=*,rx-dev=/tmp/rx.pcap,tx-dev=/tmp/tx.pcap'* > [sudo] password for admin: > EAL: Detected 2 lcore(s) > EAL: Multi-process socket /var/run/.rte_unix_1061_ce297dfe759 > EAL: Probing VFIO support... > EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the > kernel. > EAL: This may cause issues with mapping memory into secondary processes > EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using > unreliable clock cycles ! > EAL: PCI device 0000:00:03.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: PCI device 0000:00:04.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: PCI device 0000:00:05.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: Requested device 0000:00:05.0 cannot be used > PMD: Initializing pmd_pcap for net_pcap_rx_0 > PMD: Creating pcap-backed ethdev on numa socket -1 Port 2 MAC: 00 00 00 01 > 02 03 > PMD: Initializing pmd_pcap for net_pcap_tx_0 > PMD: Creating pcap-backed ethdev on numa socket -1 Port 3 MAC: 00 00 00 01 > 02 03 ^C > > Signal 2 received, preparing to exit... > ##### PDUMP DEBUG STATS ##### > -packets dequeued: 4 > -packets transmitted to vdev: 4 > -packets freed: 0 > > > Restarting........ > > *> sudo /opt/pep/active/bin/dpdk-pdump -- --pdump > 'port=0,queue=*,rx-dev=/tmp/rx.pcap,tx-dev=/tmp/tx.pcap'* > EAL: Detected 2 lcore(s) > EAL: Multi-process socket /var/run/.rte_unix_1073_cea9cc51241 > EAL: Probing VFIO support... > EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the > kernel. > EAL: This may cause issues with mapping memory into secondary processes > EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using > unreliable clock cycles ! > EAL: PCI device 0000:00:03.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: PCI device 0000:00:04.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: PCI device 0000:00:05.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: Requested device 0000:00:05.0 cannot be used > PMD: Initializing pmd_pcap for net_pcap_rx_0 > PMD: Creating pcap-backed ethdev on numa socket -1 > PMD: Initializing pmd_pcap for net_pcap_tx_0 > PMD: Creating pcap-backed ethdev on numa socket -1 Segmentation fault > > *> sudo /opt/pep/active/bin/dpdk-pdump -- --pdump > 'port=0,queue=*,rx-dev=/tmp/rx.pcap,tx-dev=/tmp/tx.pcap'* > EAL: Detected 2 lcore(s) > EAL: Multi-process socket /var/run/.rte_unix_1087_cec3ab006b1 > EAL: Probing VFIO support... > EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the > kernel. > EAL: This may cause issues with mapping memory into secondary processes > EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using > unreliable clock cycles ! > EAL: PCI device 0000:00:03.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: PCI device 0000:00:04.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: PCI device 0000:00:05.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 1af4:1000 net_virtio > EAL: Requested device 0000:00:05.0 cannot be used > RING: Cannot reserve memory > EAL: Error - exiting with code: 1 > Cause: File exists:create_mp_ring_vdev:634 > > > > Hugepage info: > cat /proc/meminfo | grep Huge > AnonHugePages: 6144 kB > HugePages_Total: 300 > HugePages_Free: 0 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > > Can you please help me in finding the issue. > > > > Thanks, > Rajesh kumar S R >