DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Assaad, Sami (Sami)" <sami.assaad@alcatel-lucent.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] DPDK-Pktgen
Date: Tue, 16 Jun 2015 21:48:33 +0000	[thread overview]
Message-ID: <D1A5FEE0.228C7%keith.wiles@intel.com> (raw)



On 6/16/15, 4:18 PM, "Assaad, Sami (Sami)"
<sami.assaad@alcatel-lucent.com> 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         = 12,
    PKT_PREAMBLE_SIZE       = 8,
    FCS_SIZE                = 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.
>

             reply	other threads:[~2015-06-16 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 21:48 Wiles, Keith [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-16 21:18 Assaad, Sami (Sami)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D1A5FEE0.228C7%keith.wiles@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=sami.assaad@alcatel-lucent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).