[dpdk-dev] [PATCH v1 4/6] app/test: collect return mbufs in distributor test
David Hunt
david.hunt at intel.com
Thu Sep 17 14:37:24 CEST 2020
Hi Lukasz,
On 15/9/2020 8:34 PM, Lukasz Wojciechowski wrote:
> During quit_workers function distributor's main core processes
> some packets to wake up pending worker cores so they can quit.
> As quit_workers acts also as a cleanup procedure for next test
> case it should also collect these packages returned by workers'
> handlers, so the cyclic buffer with returned packets
> in distributor remains empty.
>
> Fixes: c3eabff124e6 ("distributor: add unit tests")
> Cc: bruce.richardson at intel.com
> Fixes: c0de0eb82e40 ("distributor: switch over to new API")
> Cc: david.hunt at intel.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
> ---
> app/test/test_distributor.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
> index da13a9a3f..13c6397cc 100644
> --- a/app/test/test_distributor.c
> +++ b/app/test/test_distributor.c
> @@ -599,6 +599,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
> rte_distributor_process(d, NULL, 0);
> rte_distributor_flush(d);
> rte_eal_mp_wait_lcore();
> +
> + while (rte_distributor_returned_pkts(d, bufs, RTE_MAX_LCORE))
> + ;
> +
> quit = 0;
> worker_idx = 0;
> zero_idx = 0;
Acked-by: David Hunt <david.hunt at intel.com>
More information about the dev
mailing list