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 679D5C362 for ; Tue, 16 Jun 2015 23:48:37 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 16 Jun 2015 14:48:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,628,1427785200"; d="scan'208";a="728734327" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga001.fm.intel.com with ESMTP; 16 Jun 2015 14:48:35 -0700 Received: from orsmsx156.amr.corp.intel.com (10.22.240.22) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 16 Jun 2015 14:48:35 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by ORSMSX156.amr.corp.intel.com (10.22.240.22) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 16 Jun 2015 14:48:34 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.28]) by FMSMSX110.amr.corp.intel.com ([169.254.14.199]) with mapi id 14.03.0224.002; Tue, 16 Jun 2015 14:48:34 -0700 From: "Wiles, Keith" To: "Assaad, Sami (Sami)" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] DPDK-Pktgen Thread-Index: AQHQqH4xS7f+Rs2+UEaAIiL9jcFmLA== Date: Tue, 16 Jun 2015 21:48:33 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.90.124] Content-Type: text/plain; charset="us-ascii" Content-ID: <550222088660F64D82A8D04503A30202@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] DPDK-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: Tue, 16 Jun 2015 21:48:37 -0000 On 6/16/15, 4:18 PM, "Assaad, Sami (Sami)" wrote: >Hello. > >I am using DPDK-Pktgen (Pktgen version 2.77 using DPDK-1.7.1). >My NIC consists of two 10G ports. Please try to use the latest version from here http://dpdk.org/browse/apps/pktgen-dpdk/refs/ The one you are using is fairly old now. >Now, my question is : How are the port MBits/s Rx/Tx calculated? You could look at the code to find the answer on exactly how it calculates the bit rate. > >Example: I am running the traffic generator with the following >configuration: > >* 400 Byte Packet Sizes > >* At Line Rate (i.e: 100%) > >* Unidirectional (Tx only) > >The Pkts/s TX is 2985600. (Looks correct) >But the MBits/s Tx is set to 2006 (per port Tx). INTER_FRAME_GAP =3D 12, PKT_PREAMBLE_SIZE =3D 8, FCS_SIZE =3D 4, #define Million (uint64_t)(1000ULL * 1000ULL) #define iBitsTotal(_x) \ (((_x.ipackets * (INTER_FRAME_GAP + PKT_PREAMBLE_SIZE)) + _x.ibytes) << 3) #define oBitsTotal(_x) \ (((_x.opackets * (INTER_FRAME_GAP + PKT_PREAMBLE_SIZE)) + _x.obytes) << 3) snprintf(buff, sizeof(buff), "%lu/%lu", iBitsTotal(info->rate_stats)/Million, oBitsTotal(info->rate_stats)/Million); wr_scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff); I will let you do the math :-) When I run the 2.9.1 code and DPDK 2.1 I get almost line rate for 400 bytes frames. The values are calculated from the NIC counters. If the old is wrong then update to the latest version is my only suggestion. Regards, ++Keith > >How does DPDK-Pktgen calculate 2006 MBits/s Tx ? >Is this a bug? > >Thanks in advance. > >Best Regards, >Sami Assaad. >