From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by dpdk.org (Postfix) with ESMTP id 3BC6958D7 for ; Thu, 12 Jun 2014 21:47:40 +0200 (CEST) Received: by mail-la0-f41.google.com with SMTP id hz20so949546lab.0 for ; Thu, 12 Jun 2014 12:47:54 -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 :content-transfer-encoding; bh=jrVCk81XysqvEb+12T4Y7usv8Vr2xz4kYKujpeYYTlA=; b=sFPj2llmvDfCRHeqdFRBbIvvVP97ogRrZ/VvZP+uabVpA6GcWqyssShTWg96yyTgrk U30kv+WJ1yruM8xTYXJ+aDbj0HoEqgKdWPrpEF7jLkyMqqaxY098MTOxiPjFWKRBSnhB Zekyf0+usbYKmT9AschckeutNuJu/zvchWs7cY2wPwJlaKK2qR8KobA0jUT8dBka8tJf 1LFqy/OEiIUbtIU4RZV8DWsVRnYoeDO+DWmbmGLDHL4g+fVRi/dJaIGx+17dTF3l/V+2 wXMj9kE89MWwcMOfCu6FKwjW/yubQDJ7oua7jJt1iZ2s/izDNVfBchKgew/czEur8oHN PPhA== MIME-Version: 1.0 X-Received: by 10.152.18.133 with SMTP id w5mr2948903lad.60.1402602473926; Thu, 12 Jun 2014 12:47:53 -0700 (PDT) Received: by 10.112.170.132 with HTTP; Thu, 12 Jun 2014 12:47:53 -0700 (PDT) Date: Fri, 13 Jun 2014 01:17:53 +0530 Message-ID: From: Raj Ravi To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] l2fwd application - packets not getting forwarded 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: Thu, 12 Jun 2014 19:47:40 -0000 Hi, I am trying to run l2fwd application in ixgbe based network adapter. Followed the below steps: 1. Add hugepages in grub commandline. 1024 pages of 2 MB allocated. 2. verify hugepages support in /proc/meminfo. 3.mounted huge pages as below: mount -t hugetlbfs nodev /mnt/huge 4. built DPDK environment for x86_64-default-linuxapp-gcc. 5. built l2fwd applicaition after exporting $RTE_SDK and $RTE_TARGET. I have three machines connected like this: machine 1 <----> machine 2 <---> machine 3 machine 1 -> where pktgen runs to generate traffic machine 2 -> l2fwd runs machine 3 -> I should be able to observe packets here using tcpdump.?? First I run l2fwd like below (in machine 2): ./l2fwd -c f -n 4 -- -q 4 -p 3 Note port 1 and 2 are ixgbe port which are already bind to igb_uio driver. Q1. My understanding is whatever traffic arrives in port 1 will be forwarded to port 2. and port 2 will be forwarded to port 1. Please correct me here. ? Q2. from machine 1 to machine 3 , ping should work?? In machine 1 , pktgen script is run as below : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D pktgen script used: #!/bin/sh # pktgen.conf -- Sample configuration for send on two devices on a UP syste= m #modprobe pktgen #modprobe pktgen function pgset() { local result echo $1 > $PGDEV result=3D`cat $PGDEV | fgrep "Result: OK:"` if [ "$result" =3D "" ]; then cat $PGDEV | fgrep Result: fi } function pg() { echo inject > $PGDEV cat $PGDEV } # On UP systems only one thread exists -- so just add devices # We use eth0 echo "Adding devices to run". PGDEV=3D/proc/net/pktgen/kpktgend_0 pgset "rem_device_all" pgset "add_device eth0" pgset "max_before_softirq 10000" #pgset "add_device eth0" # Configure the individual devices echo "Configuring devices" PGDEV=3D/proc/net/pktgen/eth0 #pgset "delay 0" pgset "clone_skb 1000000" pgset "pkt_size 60" #pgset "min_pkt_size 60" #pgset "max_pkt_size 60" #pgset "min_pkt_size 92" #pgset "max_pkt_size 92" pgset "src_mac 70:71:BC:A8:5A:E8" pgset "dst_mac 70:71:bc:dc:92:ab" pgset "count 10000000" # Time to run PGDEV=3D/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" pgset "start" echo "Done" cat /proc/net/pktgen/eth0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Q3: In above script, is it mandatory to mention both source and destination macs ?? Also, destination mac should "machine 3" 's mac address?? Q4: With the above setting , I "CANNOT" see the stats getting incremented at all ?? I fear the traffic is not passing through the ixgbe ports at all. Q5: I have tried using testpmd application, here, all the packets are shown in RX errors. RHEL7, 3.10.32 kernel used. DPDK 1.6.0-18.zip used. l2fwd application log: =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 EAL: Detected lcore 0 as core 0 on socket 0 EAL: Detected lcore 1 as core 1 on socket 0 EAL: Detected lcore 2 as core 2 on socket 0 EAL: Detected lcore 3 as core 3 on socket 0 EAL: Detected lcore 4 as core 4 on socket 0 EAL: Detected lcore 5 as core 5 on socket 0 EAL: Detected lcore 6 as core 6 on socket 0 EAL: Detected lcore 7 as core 7 on socket 0 EAL: Detected lcore 8 as core 0 on socket 0 EAL: Detected lcore 9 as core 1 on socket 0 EAL: Detected lcore 10 as core 2 on socket 0 EAL: Detected lcore 11 as core 3 on socket 0 EAL: Detected lcore 12 as core 4 on socket 0 EAL: Detected lcore 13 as core 5 on socket 0 EAL: Detected lcore 14 as core 6 on socket 0 EAL: Detected lcore 15 as core 7 on socket 0 EAL: Support maximum 64 logical core(s) by configuration. EAL: Detected 16 lcore(s) EAL: Setting up memory... EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f6e89400000 (size =3D 0x200000) EAL: Ask a virtual area of 0x7fc00000 bytes EAL: Virtual area found at 0x7f6e09600000 (size =3D 0x7fc00000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f6e09200000 (size =3D 0x200000) EAL: Requesting 1024 pages of size 2MB from socket 0 EAL: TSC frequency is ~2200002 KHz EAL: Master core 2 is ready (tid=3D89bbd840) EAL: PCI device 0000:01:00.0 on NUMA socket 0 EAL: probe driver: 8086:1528 rte_ixgbe_pmd EAL: PCI memory mapped at 0x7f6e89987000 EAL: PCI memory mapped at 0x7f6e89bcf000 EAL: PCI device 0000:01:00.1 on NUMA socket 0 EAL: probe driver: 8086:1528 rte_ixgbe_pmd EAL: PCI memory mapped at 0x7f6e89787000 EAL: PCI memory mapped at 0x7f6e89bcb000 EAL: PCI device 0000:06:00.0 on NUMA socket 0 EAL: probe driver: 8086:1521 rte_igb_pmd EAL: PCI memory mapped at 0x7f6e89687000 EAL: PCI memory mapped at 0x7f6e89bc7000 EAL: PCI device 0000:06:00.1 on NUMA socket 0 EAL: probe driver: 8086:1521 rte_igb_pmd EAL: 0000:06:00.1 not managed by UIO driver, skipping Lcore 2: RX port 0 Lcore 2: RX port 1 Initializing port 0... done: Port 0, MAC address: A0:36:9F:05:E8:2C Initializing port 1... done: Port 1, MAC address: A0:36:9F:05:E8:2E Skipping disabled port 2 Checking link status.................................done Port 0 Link Up - speed 1000 Mbps - full-duplex Port 1 Link Up - speed 1000 Mbps - full-duplex L2FWD: entering main loop on lcore 2 L2FWD: -- lcoreid=3D2 portid=3D0 L2FWD: -- lcoreid=3D2 portid=3D1 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =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 Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 =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 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =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 Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 =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 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =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 Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 =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 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =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 Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 =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 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =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 Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 =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 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Aggregate statistics =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 Total packets sent: 0 Total packets received: 0 Total packets dropped: 0 =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 =1B[2J=1B[1;1H Port statistics =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 Statistics for port 0 ------------------------------ Packets sent: 0 Packets received: 0 Packets dropped: 0 Statistics for port 1 ------------------------------ Packets sent: 0 =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 Please correct/ provide suggestion if any of my assumption is wrong. Thanks, Kavi