[dpdk-dev] [PATCH v2] app/flow-perf: fix condition of hairpin queues setup

Thomas Monjalon thomas at monjalon.net
Mon Jul 6 10:15:42 CEST 2020


06/07/2020 09:53, Wisam Jaddo:
> The hairpin queue is the one that start from normal rxq,
> and will be less than nr_queues where nr_queues is the
> sum of normal and hairpin
> 
> Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
> Cc: wisamm at mellanox.com
> 
> Signed-off-by: Wisam Jaddo <wisamm at mellanox.com>
> Reviewed-by: Asaf Penso <asafp at mellanox.com>
> 
> ---
> v2:
> * Add documentation of hairpin peering and allocating logic.
> * Add documentation for some variables.
> ---
> --- a/app/test-flow-perf/main.c
> +++ b/app/test-flow-perf/main.c
> @@ -1012,8 +1012,26 @@ init_port(void)
>  				rte_strerror(-ret), port_id);
>  
>  		if (hairpinq != 0) {
> +			/* Each hairpin queue setup need a hairpin configuration
> +			 * object, which determine the TX path for hairpin.
> +			 *
> +			 * The peering here represent the TX side, which mean the
> +			 * peer.port represent TX port, and peer.queue represent
> +			 * tx_queue.
> +			 *
> +			 * So if RXQ=4 and TXQ=4, and first hairpin_q is 4 after
> +			 * [0, 1, 2, 3], then tx_queue is TXQ+i which is 4 as well.
> +			 *
> +			 * hairpinq: represent the number of hairpin queues needed
> +			 * to be initialized.
> +			 *
> +			 * In 0 case means no hairpin queues needed which is the
> +			 * default.
> +			 *
> +			 * hairpin_q: represent hairpin queue id to be initialized.
> +			 */

Variables doc should be on variable declaration.





More information about the dev mailing list