From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Mahan Subject: Re: l3fwd doesn't seem to work Date: Fri, 14 Jun 2013 00:41:38 -0700 Message-ID: <51BAC932.1000908@mahan.org> References: <51BAA5BC.1020506@mahan.org> <581E2E1085FAEF45B48CF8A139824CF804E5C14F7C@ACNMAIL1.ACN.ADVANTECH.CORP> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "dev-VfR2kkLFssw@public.gmane.org" To: =?UTF-8?B?IkppYS5TdWko6LS+552iKSI=?= Return-path: In-Reply-To: <581E2E1085FAEF45B48CF8A139824CF804E5C14F7C-vBGlDtGOlKBBva6MZ6yAsJWt57iikwTfrKKpfKFFTNI@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Wow, thanks very much for that. I guess I missed that in the documentation. I'll fix that up first thing in the morning. Patrick On 6/13/13 10:17 PM, Jia.Sui(=E8=B4=BE=E7=9D=A2) wrote: > Hi Patrick >=20 > for l3fwd you need also set the destination mac address to the receive = port mac address on DUT(which run l3fwd) > Please refer the attachment. >=20 > thanks >=20 > -----Original Message----- > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Patrick Mahan > Sent: Friday, June 14, 2013 1:10 PM > To: dev-VfR2kkLFssw@public.gmane.org > Subject: [dpdk-dev] l3fwd doesn't seem to work >=20 > All, >=20 > I am trying to run l3fwd example. >=20 > The system is a single chip E5-2690 (8 core) with 64 GB of DDR3 memory = and > a 82599 2 port NIC connected to an Ixia traffic generator. >=20 > I have successfully run test, testpmd and l2fwd. Both testpmd and l2fw= d seem to > work as documented. >=20 > However, l3fwd doesn't seem to be working. >=20 > I made two changes in the code: >=20 > 1. I changed the hard-coded config to the following >=20 > {0, 0, 0}, > {0, 1, 1}, > {0, 2, 2}, > {0, 3, 3}, > {1, 0, 4}, > {1, 1, 5}, > {1, 2, 6}, > {1, 3, 7} >=20 > 2. I change the hardcoded LPM routes to the following: >=20 > {IPv4(192,168,10,0), 24, 0}, > {IPv4(192,168,11,0), 24, 0}, > {IPv4(192,168,12,0), 24, 0}, > {IPv4(192,168,13,0), 24, 0}, > {IPv4(192,168,14,0), 24, 0}, > {IPv4(192,168,15,0), 24, 0}, > {IPv4(192,168,16,0), 24, 0}, > {IPv4(192,168,17,0), 24, 0}, > {IPv4(192,168,18,0), 24, 0}, > {IPv4(192,168,19,0), 24, 0}, > {IPv4(192,168,20,0), 24, 1}, > {IPv4(192,168,21,0), 24, 1}, > {IPv4(192,168,22,0), 24, 1}, > {IPv4(192,168,23,0), 24, 1}, > {IPv4(192,168,24,0), 24, 1}, > {IPv4(192,168,25,0), 24, 1}, > {IPv4(192,168,26,0), 24, 1}, > {IPv4(192,168,27,0), 24, 1}, > {IPv4(192,168,28,0), 24, 1}, > {IPv4(192,168,29,0), 24, 1}, >=20 > The Ixia is setup to generate packets varying from 192.168.20.1-192.168= .29.256 to > port 0 and 192.168.10.1-192.168.19.256 to port 1. >=20 > I started the l3fwd with the following command: >=20 > sudo ./build/l3fwd -b 0000:06:00.0 -b 0000:06:00.1 -c ff -n 3 -- -p 3 >=20 > Ports 06:00.0 and 06:00.1 are the Intel i350 ports on the motherboard. >=20 > If I understand the code, this should setup 4 lcores listening for pack= ets > on port 0 using 4 queues, and 4 lcores listening for packets on port 1 > using 4 queues. >=20 > The l3pwd example starts up (see the output below) but just sits there = and > no traffic is routed. I even put in a timeout count to print the inter= face > stats (using rte_eth_stats_get()) to see if there was some issue at pla= y. >=20 > The reads always return 0 (polling) and it is as if no packets are seen= on > the interface. When I run testpmd or l2pmd with the same packet stream= , I > see packets going through. >=20 > Any ideas what is up? Did I mis-configure something? >=20 > Thanks, >=20 > Patrick >=20 > Here is the output when I run l3pwd: >=20 > EAL: coremask set to ff > EAL: Using native RDTSC > EAL: Detected lcore 0 on socket 0 > EAL: Detected lcore 1 on socket 0 > EAL: Detected lcore 2 on socket 0 > EAL: Detected lcore 3 on socket 0 > EAL: Detected lcore 4 on socket 0 > EAL: Detected lcore 5 on socket 0 > EAL: Detected lcore 6 on socket 0 > EAL: Detected lcore 7 on socket 0 > EAL: Detected lcore 8 on socket 0 > EAL: Detected lcore 9 on socket 0 > EAL: Detected lcore 10 on socket 0 > EAL: Detected lcore 11 on socket 0 > EAL: Detected lcore 12 on socket 0 > EAL: Detected lcore 13 on socket 0 > EAL: Detected lcore 14 on socket 0 > EAL: Detected lcore 15 on socket 0 > EAL: Requesting 4 pages of size 1073741824 > EAL: Ask a virtual area of 0x40000000 bytes > EAL: Virtual area found at 0x7f43c0000000 (size =3D 0x40000000) > EAL: Ask a virtual area of 0xc0000000 bytes > EAL: Virtual area found at 0x7f42c0000000 (size =3D 0xc0000000) > EAL: Master core 0 is ready (tid=3Db19a800) > EAL: Core 1 is ready (tid=3D9d97700) > EAL: Core 2 is ready (tid=3D9396700) > EAL: Core 3 is ready (tid=3D3fff700) > EAL: Core 4 is ready (tid=3Dbffff700) > EAL: Core 5 is ready (tid=3D35fe700) > EAL: Core 6 is ready (tid=3D2bfd700) > EAL: Core 7 is ready (tid=3D21fc700) > Allocated mbuf pool on socket 0 > LPM: Allocated LPM with 1024 rules, tbl24: 16777216 entries, tbl8: 6553= 6 groups x > 256 entries > LPM: Adding route 0xc0a80a00 / 24 (0) > LPM: Adding route 0xc0a80b00 / 24 (0) > LPM: Adding route 0xc0a80c00 / 24 (0) > LPM: Adding route 0xc0a80d00 / 24 (0) > LPM: Adding route 0xc0a80e00 / 24 (0) > LPM: Adding route 0xc0a80f00 / 24 (0) > LPM: Adding route 0xc0a81000 / 24 (0) > LPM: Adding route 0xc0a81100 / 24 (0) > LPM: Adding route 0xc0a81200 / 24 (0) > LPM: Adding route 0xc0a81300 / 24 (0) > LPM: Adding route 0xc0a81400 / 24 (1) > LPM: Adding route 0xc0a81500 / 24 (1) > LPM: Adding route 0xc0a81600 / 24 (1) > LPM: Adding route 0xc0a81700 / 24 (1) > LPM: Adding route 0xc0a81800 / 24 (1) > LPM: Adding route 0xc0a81900 / 24 (1) > LPM: Adding route 0xc0a81a00 / 24 (1) > LPM: Adding route 0xc0a81b00 / 24 (1) > LPM: Adding route 0xc0a81c00 / 24 (1) > LPM: Adding route 0xc0a81d00 / 24 (1) > EAL: probe driver: 8086:10fb rte_ixgbe_pmd > EAL: unbind kernel driver /sys/bus/pci/devices/0000:03:00.0/driver/unbi= nd > EAL: bind PCI device 0000:03:00.0 to igb_uio driver > EAL: Device bound > EAL: map PCI resource for device 0000:03:00.0 > EAL: Mapping resources for '/dev/uio0' starting at 0x00000000 for 52428= 8 bytes > EAL: PCI memory mapped at 0x7f4408916000 > EAL: probe driver: 8086:10fb rte_ixgbe_pmd > EAL: unbind kernel driver /sys/bus/pci/devices/0000:03:00.1/driver/unbi= nd > EAL: bind PCI device 0000:03:00.1 to igb_uio driver > EAL: Device bound > EAL: map PCI resource for device 0000:03:00.1 > EAL: Mapping resources for '/dev/uio1' starting at 0x00000000 for 52428= 8 bytes > EAL: PCI memory mapped at 0x7f4408896000 > EAL: probe driver: 8086:1521 rte_igb_pmd > EAL: probe driver: 8086:1521 rte_igb_pmd > Initializing port 0 ... Creating queues: nb_rxq=3D4 nb_txq=3D8... > Address:00:1B:21:6B:8D:D4, txq=3D0,0,0 txq=3D1,1,0 txq=3D2,2,0 txq=3D3,= 3,0 txq=3D4,4,0 > txq=3D5,5,0 txq=3D6,6,0 txq=3D7,7,0 > Initializing port 1 ... Creating queues: nb_rxq=3D4 nb_txq=3D8... > Address:00:1B:21:6B:8D:D5, txq=3D0,0,0 txq=3D1,1,0 txq=3D2,2,0 txq=3D3,= 3,0 txq=3D4,4,0 > txq=3D5,5,0 txq=3D6,6,0 txq=3D7,7,0 >=20 > Initializing rx queues on lcore 0 ... rxq=3D0,0,0 > Initializing rx queues on lcore 1 ... rxq=3D0,1,0 > Initializing rx queues on lcore 2 ... rxq=3D0,2,0 > Initializing rx queues on lcore 3 ... rxq=3D0,3,0 > Initializing rx queues on lcore 4 ... rxq=3D1,0,0 > Initializing rx queues on lcore 5 ... rxq=3D1,1,0 > Initializing rx queues on lcore 6 ... rxq=3D1,2,0 > Initializing rx queues on lcore 7 ... rxq=3D1,3,0 > done: Port 0 Link Up - speed 10000 Mbps - full-duplex > done: Port 1 Link Up - speed 10000 Mbps - full-duplex > L3FWD: entering main loop on lcore 1 > L3FWD: -- lcoreid=3D1 portid=3D0 rxqueueid=3D1 > L3FWD: entering main loop on lcore 3 > L3FWD: -- lcoreid=3D3 portid=3D0 rxqueueid=3D3 > L3FWD: entering main loop on lcore 2 > L3FWD: -- lcoreid=3D2 portid=3D0 rxqueueid=3D2 > L3FWD: entering main loop on lcore 4 > L3FWD: -- lcoreid=3D4 portid=3D1 rxqueueid=3D0 > L3FWD: entering main loop on lcore 5 > L3FWD: -- lcoreid=3D5 portid=3D1 rxqueueid=3D1 > L3FWD: entering main loop on lcore 0 > L3FWD: -- lcoreid=3D0 portid=3D0 rxqueueid=3D0 > L3FWD: entering main loop on lcore 7 > L3FWD: -- lcoreid=3D7 portid=3D1 rxqueueid=3D3 > L3FWD: entering main loop on lcore 6 > L3FWD: -- lcoreid=3D6 portid=3D1 rxqueueid=3D2 >=20