Skip to contentSkip to conversation

DPDK-Pktgen

DISCUSSION Wiles, Keith 1 participant 1 message Jun 16, 2015

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Sami (Sami)

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.

Quoted 1 line

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.

Quoted 4 lines

Example: I am running the traffic generator with the following configuration:

Quoted 8 lines

* 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

Quoted 9 lines

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

Thanks in advance.

Best Regards,
Sami Assaad.