[PATCH] app/testpmd: fix secondary process cannot dump packet

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Thu Jun 23 14:10:30 CEST 2022


On 6/23/22 21:15, peng1x.zhang at intel.com wrote:
> From: Peng Zhang <peng1x.zhang at intel.com>
> 
> The origin design is whether testpmd is primary or not, if state of
> receive queue is stop, then packets will not be dumped for show.
> While to secondary process, receive queue will not be set up, and state
> will still be stop even if testpmd is started. So packets of stated
> secondary process cannot be dumped for show.
> 
> The current design is to secondary process state of queue will be set
> to start after testpmd is started. Then packets of started secondary
> process can be dumped for show.
> 
> Fixes: a550baf24af9 ("app/testpmd: support multi-process")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Peng Zhang <peng1x.zhang at intel.com>
> ---
>   app/test-pmd/testpmd.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 205d98ee3d..93ba7e7c9b 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3007,6 +3007,18 @@ start_port(portid_t pid)
>   			if (setup_hairpin_queues(pi, p_pi, cnt_pi) != 0)
>   				return -1;
>   		}
> +
> +		if (port->need_reconfig_queues > 0 && !is_proc_primary()) {
> +			struct rte_eth_rxconf *rx_conf;
> +			for (qi = 0; qi < nb_rxq; qi++) {
> +				rx_conf = &(port->rxq[qi].conf);
> +				ports[pi].rxq[qi].state =
> +					rx_conf->rx_deferred_start ?
> +					RTE_ETH_QUEUE_STATE_STOPPED :
> +					RTE_ETH_QUEUE_STATE_STARTED;

I'm not sure why it is correct to assume that deferred queue is
not yet started.

> +			}
> +		}
> +
>   		configure_rxtx_dump_callbacks(verbose_level);
>   		if (clear_ptypes) {
>   			diag = rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN,



More information about the stable mailing list