Search code examples
dpdkovs-dpdk

dpdk-pktgen: How to change rate of packet transmission?


I am new to dpdk-pktgen and dpdk in general. My scenario is to test throughput of openvswitch-dpdk at different rates of transmission. I am using dpdk-pktgen version 22.04.1 inside a docker container. Pktgen is using the dpdkvhostuser ports that I created for OVS. I want to change the rate I want to transmit traffic, like at 1 Mpps or 5 Gbits/s suppose. However I am unable to understand with the pktgen CLI commands available, on how to do that. If anyone knows please could you kindly give me a detailed explanation on it.

Thanks!


Solution

  • I always recommend pktgen document to understand how to use Pktgen CLI. As per Pktgen

    1. set <portlist> rate <percent> - Packet rate in percentage - controls the rate.
    2. set <portlist> burst <value> - number of packets in a burst - controls the numbers of packets per burst.

    So for the question I want to change the rate I want to transmit traffic, like at 1 Mpps or 5 Gbits/s suppose; one needs to use set [port] rate [% of actual link speed] and set [port] burst [1-128] to control the TX packets per second.

    Example: if one needs to send 1Gbps over VHOST-USER Interface, the easiest cli configuration is to use set all burst 10. now to have precise Packets one might need to use packets per burst set all burst 1.