From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by dpdk.org (Postfix) with ESMTP id 7FE49231C for ; Wed, 5 Feb 2014 08:51:27 +0100 (CET) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.14.5/8.14.5) with ESMTP id s157qlFM002878 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 4 Feb 2014 23:52:47 -0800 (PST) Received: from ALA-MBA.corp.ad.wrs.com ([169.254.2.104]) by ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) with mapi id 14.02.0347.000; Tue, 4 Feb 2014 23:52:46 -0800 From: "Wiles, Roger Keith" To: Banashankar KV Thread-Topic: [dpdk-dev] Sending modified pcap packets from pktgen. Thread-Index: AQHPIh1Ho7WzcG6wzUqWCRkyB9uj/pqm0EqA Date: Wed, 5 Feb 2014 07:52:45 +0000 Message-ID: <8A27EE6B-AD77-4FE0-A6A2-F0B203E107AF@windriver.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.40.170] MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "" Subject: Re: [dpdk-dev] Sending modified pcap packets from pktgen. 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: Wed, 05 Feb 2014 07:51:28 -0000 The mempool is setup to not cache the packets and the order you send the pa= ckets will be the same order they appear on the wire. Also packets are stor= ed on the TX done queue and it is hard to get the queue to flush them back = to the mempool. Even after you stop sending packets you can still have pack= ets on the TX ring in the done state, but not flushed to the mempool list. = The only way I have found to clean the TX done queue is to disable the port= and reenable it again. :-( In Pktgen the packets are read into memory and then copied into the mempool= of tx packet and place back on the mempool free list. In one of the previo= us versions of Pktgen if the TX ring becomes full then the packets were bei= ng freed back to the mempool. The mempool should put the freed packet on th= e end of the free list to maintain order, but because the TX done ring is n= ot cleaned up the freed packets are getting placed on the mempool list out = of order. Not sure what is really happening to you as I do not have enough informatio= n to determine the problem. Please make sure you have the latest Pktgen version. Keith Wiles, Principal Technologist for Networking member of the CTO office= , Wind River mobile 972.213.5533 [Powering 30 Years of Innovation] On Feb 4, 2014, at 8:51 PM, Banashankar KV > wrote: Hi, I am trying to send out modified pcap packets in a loop as shown below.I am trying to modify source IP and source port. for each *packet[12 in number]* for each *sip[2 in number]* for each *port[10 in number]* change to *port *and *sip *in *packet* ret =3D rte_eth_tx_burst(.....) For the 6th packet, 80% of the packets sent out are same wrong packet and other time i see the same other packet 2-3 times instead of the correct packet. But if I place a breakpoint and send the packets one after the other, all the packets have their respective modified port and source IP. I am not able to figure out why it's behaving like this. is there any caching of the packets or something like that? In rte_mempool_create I see its passing 0 for cache size. Thanks Banashankar