From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) by dpdk.org (Postfix) with ESMTP id DF2454CE7 for ; Wed, 27 Jul 2016 22:42:44 +0200 (CEST) Received: by mail-lf0-f53.google.com with SMTP id b199so35707862lfe.0 for ; Wed, 27 Jul 2016 13:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4BKz+UP5vJgvKCQciYPklbCk8ahIriaK8ZFtAT+2l7M=; b=IImiy86ZdSNOMTvkgj3eABApBHjPStQjspGZjxFbb8pFU2qOSZ4lgOYYojzyMMFs/L VRd/zyTXeF/C0Dh+iONbeLzPFePkNFwpBF5I1KMMYMKzGTS2hsk7ollX2CdGHqTVfJzH GrGNU7DquQC8A0cODMjOlnSJ1GzwVHpX1gjYvZXleu6xSxpKqYst61+VYANLKJnx+QJE CWPIcAyJR88qGPV6OmTUEw4SRHHhWMlRy3xv3PncrEVm/3Uwy2GXOyRqYN+rN49pkjyS ULPQTZau7zCVMxbVHJwVxzMkYdCr0a3skhNbLkv06STQPFr3Qhx9Ss5q/32WuydvYE08 6IAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4BKz+UP5vJgvKCQciYPklbCk8ahIriaK8ZFtAT+2l7M=; b=XZeJpGPWJIJ4LbbFsZZtTLKEgsGD6aMskW2VJ1LpeXLCjuPMntzSE9ge+fgyx9sKv6 3ll3c0uJ8fj77ku3R+7+tTrkZqarqsS4TKEWpzAhucJkvW44+c5ufNTYJ6DApI3kZa1i boBIKQfJnmyflRITlxpIixu0zzYJFZ3jfO3oqTH/jTHw7dj3hT7vB/10lnLbZ3tkO5Wt wxfoLxT8P1rPTCxmQTDuplhqLMl7sJfD/2prE7nj0W6aMkPmEdYuAQibg7wJuD7/ZYVA 2nf/HHlTUJbqfSkoiqN6ZbewLHxdq6Hy3YCY+jpTx7BWXiDNZGjybBe1H8qDOGP9GmOD F58w== X-Gm-Message-State: AEkoouvRXYpXHv/loeko3jXfyuFCuHSan7jFYdKdFcBsegP/xuVF9djTY5KFJVpmJWjc84q/wRGFnUKZ72T8vg== X-Received: by 10.25.150.141 with SMTP id y135mr10937925lfd.66.1469652164349; Wed, 27 Jul 2016 13:42:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.158.142 with HTTP; Wed, 27 Jul 2016 13:42:43 -0700 (PDT) In-Reply-To: References: From: Vincent Li Date: Wed, 27 Jul 2016 13:42:43 -0700 Message-ID: To: Charlie Li Cc: users@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-users] How to test l3fwd? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 20:42:45 -0000 I figured it out too. just for the sake of future reference if anyone running into same kind of issue. I used DPDK pktgen as packet generator and my set up as below: syn flood flow: pktgen box Port0 ( random source ip, destination ip 2.1.1.1) -> DPDK Port0 (1.1.1.0) ..(l3fwd)..DPDK Port1 (2.1.1.0) -> pktgen box linux driver nic (ip 2.1.1.1) 1, pktgen box (used mTCP DPDK port so there is actual dpdk0 interface in Linux,everything else is same as upstream DPDK, have or not have dpdk0 in linux does not matter here): 21: dpdk0: mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000 link/ether 00:1b:21:50:bc:38 brd ff:ff:ff:ff:ff:ff inet 10.0.0.126/24 brd 10.0.0.255 scope global dpdk0 valid_lft forever preferred_lft forever inet6 fe80::21b:21ff:fe50:bc38/64 scope link valid_lft forever preferred_lft forever 8: p1p2: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:1b:21:50:bc:39 brd ff:ff:ff:ff:ff:ff inet 2.1.1.1/24 scope global p1p2 valid_lft forever preferred_lft forever inet6 fe80::21b:21ff:fe50:bc39/64 scope link valid_lft forever preferred_lft forever relevant pktgen load test file config: set ip dst 0 2.1.1.1 set mac 0 a0:36:9f:a1:4d:6c # <====this should be the l3fwd DPDK port 0 mac dst.ip start 0 2.1.1.1 dst.ip min 0 2.1.1.1 dst.ip max 0 2.1.1.1 dst.ip inc 0 0.0.0.1 start pktgen #./app/app/x86_64-native-linuxapp-gcc/pktgen -c 0x6ff -- -m [2:2-15].0 Pktgen> load Pktgen> start 0 Pktgen> page range Pktgen> page main - Ports 0-0 of 1
Copyright (c) <2010-2016>, Intel Corporation Flags:Port : ------R--------:0 Link State : ----TotalRate---- Pkts/s Max/Rx : 0/0 0/0 Max/Tx : 1488234/1488196 1488200/1488196 MBits/s Rx/Tx : 0/952 0/952 Broadcast : 0 2 l3fwd dpdk root@r210:/home/dpdk/mtcp/dpdk-16.04# ./tools/dpdk_nic_bind.py --status Network devices using DPDK-compatible driver ============================================ 0000:01:00.0 'I350 Gigabit Network Connection' drv=igb_uio unused= 0000:01:00.1 'I350 Gigabit Network Connection' drv=igb_uio unused= start l3fwd #./build/l3fwd -c 0xf -- -p 0x3 --config="(0,0,0),(0,1,1),(1,0,2),(1,1,3)" try more complete run example if above does not work #./build/l3fwd -c 0xf -- -p 0x3 --eth-dest=, --eth-dest=, -P --config="(0,0,0),(0,1,1),(1,0,2),(1,1,3)" ...................... L3FWD: LPM or EM none selected, default LPM on Initializing port 0 ... Creating queues: nb_rxq=2 nb_txq=4... Address:A0:36:9F:A1:4D:6C, Destination:02:00:00:00:00:00, Allocated mbuf pool on socket 0 LPM: Adding route 0x01010100 / 24 (0) LPM: Adding route 0x02010100 / 24 (1) LPM: Adding route IPV6 / 48 (0) LPM: Adding route IPV6 / 48 (1) txq=0,0,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f21258be940 hw_ring=0x7f21258c0980 dma_addr=0x5a88c0980 txq=1,1,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f21258ac7c0 hw_ring=0x7f21258ae800 dma_addr=0x5a88ae800 txq=2,2,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f212589a640 hw_ring=0x7f212589c680 dma_addr=0x5a889c680 txq=3,3,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f21258884c0 hw_ring=0x7f212588a500 dma_addr=0x5a888a500 Initializing port 1 ... Creating queues: nb_rxq=2 nb_txq=4... Address:A0:36:9F:A1:4D:6D, Destination:02:00:00:00:00:01, txq=0,0,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f2125876240 hw_ring=0x7f2125878280 dma_addr=0x5a8878280 txq=1,1,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f21258640c0 hw_ring=0x7f2125866100 dma_addr=0x5a8866100 txq=2,2,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f2125851f40 hw_ring=0x7f2125853f80 dma_addr=0x5a8853f80 txq=3,3,0 PMD: eth_igb_tx_queue_setup(): sw_ring=0x7f212583fdc0 hw_ring=0x7f2125841e00 dma_addr=0x5a8841e00 3, pktgen box linux driver port # tcpdump -nn -i p1p2 -c 10 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on p1p2, link-type EN10MB (Ethernet), capture size 65535 bytes 13:37:07.166150 IP 216.145.81.59.26391 > 2.1.1.1.80: Flags [S], seq 3699016466:3699016472, win 8192, length 6 13:37:07.166152 IP 21.170.7.19.11344 > 2.1.1.1.80: Flags [S], seq 3254728108:3254728114, win 8192, length 6 13:37:07.166152 IP 62.211.26.25.5831 > 2.1.1.1.80: Flags [S], seq 2610626014:2610626020, win 8192, length 6 13:37:07.166153 IP 138.128.151.152.16368 > 2.1.1.1.80: Flags [S], seq 301380038:301380044, win 8192, length 6 13:37:07.166153 IP 254.40.13.171.30996 > 2.1.1.1.80: Flags [S], seq 1583422545:1583422551, win 8192, length 6 13:37:07.166154 IP 153.32.214.3.11340 > 2.1.1.1.80: Flags [S], seq 519927713:519927719, win 8192, length 6 13:37:07.166155 IP 167.247.215.107.21169 > 2.1.1.1.80: Flags [S], seq 3713824255:3713824261, win 8192, length 6 13:37:07.166155 IP 236.183.249.37.2446 > 2.1.1.1.80: Flags [S], seq 2407370042:2407370048, win 8192, length 6 13:37:07.166156 IP 64.57.152.132.5826 > 2.1.1.1.80: Flags [S], seq 1338723318:1338723324, win 8192, length 6 13:37:07.166156 IP 245.146.158.211.2438 > 2.1.1.1.80: Flags [S], seq 210449720:210449726, win 8192, length 6 On Wed, Jul 27, 2016 at 10:51 AM, Vincent Li wrote: > could you please share how you figured out your problem? it appears I > am having same kind of network link setup and no packet being > forwarded, there must be something I am missing, wondering if your > solution would apply to my setup. > > Thanks! > > Vincent > > On Fri, Jul 22, 2016 at 6:18 PM, Charlie Li wrote: >> Never mind - I figured it out. >> >> On Wed, Jul 20, 2016 at 3:06 PM, Charlie Li wrote: >> >>> I am also attaching the full logs from l3fwd and l2fwd. >>> >>> On Wed, Jul 20, 2016 at 3:02 PM, Charlie Li wrote: >>> >>>> Hello, >>>> >>>> My setup is dpdk-2.2.0 on Fedora 23 Server with kernel 4.5.7. >>>> >>>> I have been testing L2 throughput with l2fwd and an Ixia traffic >>>> generator. It works as expected. >>>> >>>> Command: ./l2fwd -c 0xf -n 4 -- -p 0x3 >>>> Ixia traffic: MAC (Ethernet frames) >>>> >>>> >>>> Now I am moving to test L3 throughput with l3fwd, but cannot start >>>> traffic from Ixia >>>> >>>> Command: ./l3fwd -c 0xf -n 4 -- -p 0x3 --config="(0,0,2)(1,0,3)" >>>> Ixia traffic: IPv4 (IP packets) >>>> >>>> My question is: >>>> >>>> What are the IP addresses of the two ports? >>>> >>>> "LPM: Adding route 0x01010100 / 24 (0) >>>> LPM: Adding route 0x02010100 / 24 (1)" >>>> >>>> Does it mean the IP addresses are 1.1.1.0 (netmask 255.255.255.0) for >>>> port0 and 2.1.1.0 (netmask 255.255.255.0) for port1? >>>> >>>> I set up the following two flows, but Ixia complains "unreachable" >>>> >>>> Flow1: Ixia PortA (1.1.1.100) -> DPDK Port0 (1.1.1.0) .........(l3fwd) >>>> ........ DPDK Port1 (2.1.1.0) -> Ixia PortB (2.1.1.100) >>>> Src IP: 1.1.1.100; Dst IP: 2.1.1.100; Gateway: 1.1.1.0 >>>> >>>> Flow2: Ixia PortB (2.1.1.100) -> DPDK Port1 (2.1.1.0) .........(l3fwd) >>>> ........ DPDK Port0 (1.1.1.0) -> Ixia PortA (1.1.1.100) >>>> Src IP: 2.1.1.100; Dst IP: 1.1.1.100; Gateway: 2.1.1.0 >>>> >>>> Thanks, >>>> Charlie >>>> >>>> >>>