From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by dpdk.org (Postfix) with ESMTP id EA29F5A44 for ; Fri, 21 Apr 2017 19:52:37 +0200 (CEST) Received: by mail-oi0-f44.google.com with SMTP id x184so106033931oia.1 for ; Fri, 21 Apr 2017 10:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=LUS2jgGgsWlo0OOrJxsS8c1YbJdW02hZmikB87R4P+o=; b=eqiVESrkDikkfRbvDDGpndidnZN+C/CMWx+GAFIJgJ2PkKeaUQg/aI47bRzza4SMTI T42KQOJ0JGpbwp9rLR84ML5kixBSO4d0tcS55LkHLaFk4B0BduQ8OusCztn00QFyNKSJ 987eRveej1sfRuBDZ0qfrceobTY6zjeRzHOvLz1xRE9MWUoICgpMO4l4APKU/WP5LELP OR/tixfuC7wr4Mo6PvBAfXrXaO9yFQ+ej/Oi278kOtqWUjsz+GY6yceW27iZvLrfPjBR xtrM/HU5Qc6lc3Kk70MMSN3VMIQPDebltXkCCOoIB8LGjGcxXLEUnHGKH225n/Vrs3sc W7pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=LUS2jgGgsWlo0OOrJxsS8c1YbJdW02hZmikB87R4P+o=; b=tSgI7o5GQsiksC+iuYltby81DC2MnD7LIQiBsQhvpu27y1HxqvkEFNSscL/5JcC3bE /MrMWyo+a4voRhqrlbWQ8JICCTuzZNehFUEUgryarad4qtFGyYkZgzxPvhHOr16dL49V U/AVVIPNbgmRvuvfpjBgMU8AlXTaE6XO9koFgn89Xm0KvmFUAXEp29QQcN+oD9sSFxgG fR0QrNp5SXcpxMFyvjw23IzCVsixUGjg4ZeuxVxdRy4+zggrhU61g7GV33KL9zgm3A8a /fKCHI4oaUCVX4g3aCXfl0bh56QsBQT+4U4lwLvaRyk+POGNtZWvR2oeL3BdO7iN3s4x ruDQ== X-Gm-Message-State: AN3rC/6TE7wqN2m7/W6DUZehz9W7B315eERIdTX7ShAokkn1HG90snH9 bvANfcHVGga6McA1IWvWw07EEMgTwQ== X-Received: by 10.157.45.199 with SMTP id g65mr8137013otb.87.1492797157058; Fri, 21 Apr 2017 10:52:37 -0700 (PDT) MIME-Version: 1.0 Sender: reza.safiyat@gmail.com Received: by 10.74.55.9 with HTTP; Fri, 21 Apr 2017 10:52:36 -0700 (PDT) In-Reply-To: <27BF670A-A527-4356-923A-ECC38E628195@intel.com> References: <27BF670A-A527-4356-923A-ECC38E628195@intel.com> From: Safiyat Reza Date: Fri, 21 Apr 2017 23:22:36 +0530 X-Google-Sender-Auth: KnNK_7ThW_J1wnTvSGyasYpeuIk Message-ID: To: "Wiles, Keith" Cc: "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Unable to send ping requests using pktgen-dpdk X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 17:52:38 -0000 On 18 April 2017 at 12:01, Wiles, Keith wrote: > > > On Apr 17, 2017, at 11:35 AM, Safiyat Reza wrote= : > > > > On 17 April 2017 at 21:25, Wiles, Keith wrote: > > Comments below: > > > > > On Apr 17, 2017, at 8:07 AM, Safiyat Reza > wrote: > > > > > > Hi, > > > > > > I am trying to ping a remote machine (within the same network) via > port 0 > > > using the command > > > > > > Pktgen> ping4 0 > > The range packets and single mode packets use different buffers. The ping= 4 > command uses its own buffers based on the single mode configuration. The > single mode config is when all of the other modes are disable or the > default configuration. The information to config the single mode packets = is > the =E2=80=98page main or page 0=E2=80=99 screen. The ping4 will construc= t a packets based > on single mode config only. The ping4 will only send a single packet and > you would have to call ping4 multiple times to send more then one. I was unaware that the ping command uses its own buffer. I was expecting my configuration via the range command to work for ping too. Thanks for this information! Worked for me. The range packets will allow a set of packets to be sent on a given port. > The sequence mode which is yet another set of buffers allow you to > construct a set of packets for a port. These are enabled with the seqCnt > set to non-zero value and use the =E2=80=98page seq=E2=80=99 or lua code = to construct the > frames. It would be good to load the lua script and then verify with the > page seq command. The =E2=80=98port N=E2=80=99 command will should= you the port for > range and sequence packets. > > So the ping4 only works with the single mode configuration and not any > others. Not sure other then PCAP file you are going to get the results yo= u > want, unless you are only needing to determine the route and ARP entries > are filled with the ping command. The prime command just sent out a short > burst of packets in an attempt to get the ARP entries filled before sendi= ng > huge amount of traffic. > > > > > > > But the packet that is received on the remote machine is not a ping > packet. > > > Upon investigation using dpdkcap (https://github.com/dpdkcap/dpdkcap) > and > > > tcpdump, the packet > > > > > > dpdkcap output: > > > reading from file output_01.pcap, link-type EN10MB (Ethernet) > > > 12:50:34.870498 IP 50.0.50.14.4660 > 50.0.50.13.22136: tcp 6 > > > 0x0000: 4500 002e 1636 0000 0406 d879 3200 320e > E....6.....y2.2. > > > 0x0010: 3200 320d 1234 5678 1234 5678 1234 5690 > 2.2..4Vx.4Vx.4V. > > > 0x0020: 5010 2000 6c72 0000 7778 797a 3031 P...lr..wxyz= 01 > > > > > > tcpdump output: > > > tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture > size > > > 65535 bytes > > > 12:53:49.828091 IP (tos 0x0, ttl 4, id 5794, offset 0, flags > > > [none], proto TCP (6), length 46) > > > 50-0-50-14.dsl.dynamic.fusionbroadband.com.4660 > > > > 50-0-50-13.dsl.dynamic.fusionbroadband.com.22136: Flags [.], cksum > 0x6c72 > > > (correct), seq 305419896:305419902, ack 305419920, win 8192, length 6 > > > > > > > > > The output after turning screen on is: > > > - Ports 0-0 of 1
Copyright (c) <2010-2016>, Intel > > > Corporation > > > Flags:Port : -E----R--------:0 > > > Link State : ----TotalRate---- > > > Pkts/s Max/Rx : 2/0 2/0 > > > Max/Tx : 1/0 1/0 > > > MBits/s Rx/Tx : 0/0 0/0 > > > Broadcast : 0 > > > Multicast : 15 > > > 64 Bytes : 0 > > > 65-127 : 0 > > > 128-255 : 0 > > > 256-511 : 3 > > > 512-1023 : 0 > > > 1024-1518 : 0 > > > Runts/Jumbos : 12/0 > > > Errors Rx/Tx : 0/0 > > > Total Rx Pkts : 15 > > > Tx Pkts : 2 > > > Rx MBs : 0 > > > Tx MBs : 0 > > > ARP/ICMP Pkts : 12/0 > > > : > > > Pattern Type : abcd... > > > Tx Count/% Rate : Forever / 255% > > > PktSize/Tx Burst : 64 / 10 > > > Src/Dest Port : 4660 /22136 > > > Pkt Type:VLAN ID : IPv4 / TCP:0001 > > > Dst IP Address : 50.0.50.13 > > > Src IP Address : 50.0.50.14/24 > > > Dst MAC Address : fa:16:3e:e3:81:68 > > > Src MAC Address : fa:16:3e:62:5e:3c > > > VendID/PCI Addr : 1af4:1000/00:04.0 > > > > > > -- Pktgen Ver: 3.1.2 (DPDK 16.07.2) Powered by Intel=C2=AE DPDK > > > ------------------- > > > > > > On the sender side (using pktgen-dpdk) apart from setting the usual > source > > > and destination ip addresses and mac addresses, I am setting > > > > > > pktgen.icmp_echo("all", "on=E2=80=9D); > > > > This command only enables processing incoming ICMP echo packets. This i= s > the =E2=80=98E=E2=80=99 flags value above. > > I understand it is to enable the replies to ping requests. Added it her= e > just for information, in case it affects the outgoing ping requests. > > > > > pktgen.send_arp("all", "g=E2=80=9D); > > > > This one only sends a single ARP packet. > > Yes. I added this piece of information just in case it affects the > outgoing ping requests. > > > > If you are trying to send multiple ping or ICMP echo request packets > then you need to construct a packet in the sequence page =E2=80=98page se= q=E2=80=99. What > is being sent is the single mode packets you see on the first page. > > > > It also looks like you have Range packets enabled, did you configure th= e > range packets via =E2=80=98page range=E2=80=99? > > > > Yes, I have configured the range feature, using a lua script. Below is > the relevant code snippet for the same. > > > > function setup() > > pktgen.set("all", "count", 0); > > pktgen.set("all", "pps", tonumber(pps)); -- custom change to > pktgen-dpdk source to support setting pps directly. > > pktgen.set("all", "size", tonumber(packetSize)); > > pktgen.set("all", "burst", tonumber(burst)); > > pktgen.set("all", "sport", 0x1234); > > pktgen.set("all", "dport", 0x5678); > > pktgen.set("all", "prime", 1); > > pktgen.set("all", "seqCnt", 0); > > > > pktgen.range.vlan_id("all", "start", tonumber(vlanid)); > > pktgen.range.vlan_id("all", "inc", 0); > > pktgen.range.vlan_id("all", "min", 1); > > pktgen.range.vlan_id("all", "max", 4094); > > > > pktgen.range.pkt_size("all", "start", tonumber(packetSize)); > > pktgen.range.pkt_size("all", "inc", 0); > > pktgen.range.pkt_size("all", "min", 64); > > pktgen.range.pkt_size("all", "max", 1518); > > > > pktgen.set_mac("all", dstmac); > > > > pktgen.set_ipaddr("all", "dst", dstip); > > pktgen.range.dst_ip("all", "start", dstipStart); > > pktgen.range.dst_ip("all", "inc", dstipInc); > > pktgen.range.dst_ip("all", "min", dstipMin); > > pktgen.range.dst_ip("all", "max", dstipMax); > > > > pktgen.range.dst_port("all", "start", dstportStart); > > pktgen.range.dst_port("all", "inc", dstportInc); > > pktgen.range.dst_port("all", "min", dstportMin); > > pktgen.range.dst_port("all", "max", dstportMax); > > > > pktgen.set_ipaddr("all", "src", srcip.."/24"); > > pktgen.range.src_ip("all", "start", srcipStart); > > pktgen.range.src_ip("all", "inc", srcipInc); > > pktgen.range.src_ip("all", "min", srcipMin); > > pktgen.range.src_ip("all", "max", srcipMax); > > > > pktgen.range.src_port("all", "start", srcportStart); > > pktgen.range.src_port("all", "inc", srcportInc); > > pktgen.range.src_port("all", "min", srcportMin); > > pktgen.range.src_port("all", "max", srcportMax); > > > > pktgen.range.dst_mac("all", "start", dstmac); > > pktgen.range.dst_mac("all", "inc", dstmacInc); > > pktgen.range.dst_mac("all", "min", dstmac); > > pktgen.range.dst_mac("all", "max", dstmac); > > > > pktgen.send_arp("all", "g"); > > pktgen.icmp_echo("all", "on"); > > pktgen.set_range("all", "on"); > > end > > > > From your reply, I still couldn't gather completely about how to > correctly send the ICMP echo request. I may need to send multiple request= s > but right now I am trying to send one request only. > > > > > > > > via a lua script file. The burst size is 10. > > > > > > I am trying this on VMs with 'Virtio network device' as the NIC and > using > > > igb_uio driver. > > > > > > I have no idea why I am unable to send ping packets. Can anyone guide > me as > > > to what I am doing wrong, or why this issue might be coming? > > > > > > Thanks! > > > > > > Regards, > > > > > > *S*afiyat *R*eza > > > Google+ | GitHu= b > > > | LinkedIn > > > > > > > Regards, > > Keith > > Regards, > Keith > >