DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] DPDK-Pktgen
@ 2015-06-16 21:18 Assaad, Sami (Sami)
  0 siblings, 0 replies; 2+ messages in thread
From: Assaad, Sami (Sami) @ 2015-06-16 21:18 UTC (permalink / raw)
  To: dev

Hello.

I am using DPDK-Pktgen (Pktgen version 2.77 using DPDK-1.7.1).
My NIC consists of two 10G ports.

Now, my question is : How are the port MBits/s Rx/Tx calculated?

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).

How does DPDK-Pktgen calculate 2006 MBits/s Tx ?
Is this a bug?

Thanks in advance.

Best Regards,
Sami Assaad.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] DPDK-Pktgen
@ 2015-06-16 21:48 Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2015-06-16 21:48 UTC (permalink / raw)
  To: Assaad, Sami (Sami), dev



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.
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-16 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 21:18 [dpdk-dev] DPDK-Pktgen Assaad, Sami (Sami)
2015-06-16 21:48 Wiles, Keith

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).