From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 53222FFA for ; Thu, 2 Feb 2017 17:59:15 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP; 02 Feb 2017 08:59:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,325,1477983600"; d="scan'208";a="61123021" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 02 Feb 2017 08:59:14 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 2 Feb 2017 08:59:13 -0800 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.230]) by FMSMSX102.amr.corp.intel.com ([169.254.10.201]) with mapi id 14.03.0248.002; Thu, 2 Feb 2017 08:59:13 -0800 From: "Wiles, Keith" To: Peter Keereweer CC: "users@dpdk.org" Thread-Topic: [dpdk-users] pktgen: sending / capturing more packets than configured? Thread-Index: AQHSfXWuIkmwfilRYkKDEV0jAmudkA== Date: Thu, 2 Feb 2017 16:59:13 +0000 Message-ID: <4248B523-645D-4710-AB39-6CBF280B95E4@intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.141.150] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] pktgen: sending / capturing more packets than configured? 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: Thu, 02 Feb 2017 16:59:16 -0000 > On Feb 2, 2017, at 12:22 AM, Peter Keereweer = wrote: >=20 > Hi! >=20 > I'am still running some tests with the Load Balancer Sample Application b= y sending packets with pktgen. I have a setup of 2 servers (Machine A and B= in the example below) with each server containing a Intel 10Gbe 82599 NIC = (connected to each other). The Load Balancer application has been configure= d to use 1 core for RX, 1 worker core and 1 TX core. The TX core sends all = packets back to the pktgen application. The packets, send back to pktgen by= the Load Balancer application, will be captured (by pktgen) and written to= a pcap-file. >=20 > So I'm using 2 servers in my test: >=20 > Machine A: pktgen > Machine B: load_balancer >=20 > This is how I started the pktgen application on Machine A and all command= s that I executed: >=20 > A: >=20 >> sudo ./pktgen -c 0x1f -n 3 -- -P -T -m "[2:4].0" >=20 > Pktgen> user.pattern 0 "TIC" > Pktgen> proto udp 0 > Pktgen> set 0 count 1024 > Pktgen> capture 0 on > Pktgen> start 0 > Pktgen> user.pattern 0 "TOC" > Pktgen> start 0 > Pktgen> capture 0 off Part of the problem could be the TOC packets are on the TX done queue and g= et reused, but the latest code 3.1.1 should be rewriting the packets before= each start. I need to look at user.pattern as it needs to update all of th= e TX packets when the command is issued. The pattern is a fixed size so I c= an see that you may have zero in front, but again I will have to check. >=20 > In pktgen I get all packets (2 x 1024 =3D 2048 packets) that I have send = to the Load Balancer application. These packets are captured and written to= disk. I expect to see 1024 'TIC' packets and 1024 'TOC' packets in the pca= pfile. But during exploring the pcap file with wireshark, I encountered som= e weird behavior. This are all packets that I can see in the pcap file (cap= tured by pktgen): >=20 > - [1-1024] TIC upd packets (1024) > - [1025-1088] TOC udp packets (64) > - [1089-1504] TIC udp packets (416) !! (why?) > - [1505-1568] TOC udp packets (64) > - [1569-1984] TIC udp packets (416) !! (why?) > - [1985-2048] TOC udp packets (64) > ------------------------------------------- > Total: (2048) >=20 > How is it possible that I send 1024 'TIC' packets with pktgen, but if I c= ount all 'TIC' packets in the pcap-file I can see more than 1024 'TIC' pack= ets (and a way less then 1024 'TOC' packets)? >=20 > To give you as much details as possible, this is how I started the Load B= alancer application on Machine B: >=20 > B: >=20 >> sudo build/app/load_balancer -c 0xfff -n 4 -- --rx "(0,0,0)" --tx "(0,2)= " --w "4" --bsz "(32,32),(64,64),(32,32)" >=20 > Another thing that strikes me is that the data, send in the UDP packets a= bove (containing the message 'TIC' or 'TOC'), is padded with zeros (6 bytes= ) at the beginning of the message. Are all packets, with user defined messa= ges, padded with zeros? >=20 > I hope someone can help me with this questions! =20 >=20 > Peter Regards, Keith