[dpdk-dev] [RFC PATCH v2] app/testpmd: tx pkt clones parameter in flowgen

Ferruh Yigit ferruh.yigit at intel.com
Mon Oct 12 20:13:27 CEST 2020


On 9/25/2020 10:07 AM, Igor Russkikh wrote:
> When testing high performance numbers, it is often that CPU performance
> limits the max values device can reach (both in pps and in gbps)
> 
> Here instead of recreating each packet separately, we use clones counter
> to resend the same mbuf to the line multiple times.
> 
Do you have any numbers on how much performance improvement gained?

> PMDs handle that transparently due to reference counting inside of mbuf.
> 
> Verified on Marvell qede and atlantic PMDs.
> 
> v2: increment ref counter for each mbuf pointer copy
> 
> Signed-off-by: Igor Russkikh <irusskikh at marvell.com>

<...>

> @@ -1151,6 +1153,16 @@ launch_args_parse(int argc, char** argv)
>   				else
>   					nb_pkt_per_burst = (uint16_t) n;
>   			}
> +			if (!strcmp(lgopts[opt_idx].name, "clones")) {
> +				n = atoi(optarg);
> +				if ((n >= 0) &&
> +				    (n <= nb_pkt_per_burst))
> +					nb_pkt_clones = (uint16_t) n;
> +				else
> +					rte_exit(EXIT_FAILURE,
> +						 "clones must be >= 0 and <= %d (burst)\n",
> +						 nb_pkt_per_burst);

Do you need to enforce the "n <= nb_pkt_per_burst", burst value can be changed 
later and trying to keep 'clones' values in sync with it is additional work.

In the flowgen logic, with each burst a new packet is created anyway. So instead 
of enforcing the 'clones' number range, in documentation you can say the clone 
number can't exceed the burst number whatever it is set.

> +			}
>   			if (!strcmp(lgopts[opt_idx].name, "mbcache")) {
>   				n = atoi(optarg);
>   				if ((n >= 0) &&
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index fe6450cc0..18b4b63d1 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -228,6 +228,7 @@ uint32_t tx_pkt_times_intra;
>   /**< Timings for send scheduling in TXONLY mode, time between packets. */
>   
>   uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per burst. */
> +uint16_t nb_pkt_clones; /**< Number of tx packet clones to send. */
>   uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */
>   

Both the parameter name, 'clones', and the variable name 'nb_pkt_clones' are too 
generic, and may mislead users. Please remember that testpms usage is very wide.
You are updating very specifically the flowgen forwarding engine, can you please 
prefix the 'flowgen', like:
'flowgen-clones' & 'nb_pkt_flowgen_clones'.
Also explicitly mention in the description that this is for flowgen clones.

<...>


More information about the dev mailing list