DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stanislaw Kardach <kda@semihalf.com>
To: dev@dpdk.org, david.hunt@intel.com
Cc: upstream@semihalf.com, l.wojciechow@partner.samsung.com,
	Stanislaw Kardach <kda@semihalf.com>,
	David Marchand <david.marchand@redhat.com>
Subject: [dpdk-dev] [PATCH v2 2/2] test/distributor: fix burst flush on worker quit
Date: Wed, 28 Apr 2021 16:25:53 +0200	[thread overview]
Message-ID: <20210428142553.1593546-3-kda@semihalf.com> (raw)
In-Reply-To: <20210428142553.1593546-1-kda@semihalf.com>

While working on RISC-V port I have encountered a situation where worker
threads get stuck in the rte_distributor_return_pkt() function in the
burst test.
Investigation showed some of the threads enter this function with
flag RTE_DISTRIB_GET_BUF set in the d->retptr64[0]. At the same time the
main thread has already passed rte_distributor_process() so nobody will
clear this flag and hence workers can't return.

What I've noticed is that adding a flush just after the last _process(),
similarly to how quit_workers() function is written in the
test_distributor.c fixes the issue.
Lukasz Wojciechowski reproduced the same issue on x86 using a VM with 32
emulated CPU cores to force some lcores not to be woken up.

Fixes: 7c3287a10535 ("test/distributor: add performance test for burst mode")
Cc: David Marchand <david.marchand@redhat.com>

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 app/test/test_distributor_perf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index 371a14ba4..fdbeae6d2 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -196,6 +196,7 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
 	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
 
 	rte_distributor_process(d, NULL, 0);
+	rte_distributor_flush(d);
 	rte_eal_mp_wait_lcore();
 	quit = 0;
 	worker_idx = 0;
-- 
2.27.0


  parent reply	other threads:[~2021-04-28 14:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210426163404eucas1p13be6ae1bbcc4b947599cb606befd5370@eucas1p1.samsung.com>
2021-04-26 16:33 ` [dpdk-dev] [RFC PATCH] " Stanislaw Kardach
2021-04-28  7:46   ` Lukasz Wojciechowski
2021-04-28 12:50     ` David Hunt
2021-04-28 12:53       ` Stanisław Kardach
2021-04-28 13:03         ` David Hunt
2021-04-28 13:11   ` David Marchand
2021-04-28 13:22     ` Stanisław Kardach
2021-04-28 14:25   ` [dpdk-dev] [PATCH v2 0/2] test/distributor: perf burst mode quit fixes Stanislaw Kardach
2021-04-28 14:25     ` [dpdk-dev] [PATCH v2 1/2] test/distributor: fix worker notification in burst Stanislaw Kardach
2021-04-28 14:25     ` Stanislaw Kardach [this message]
2021-05-05 14:54     ` [dpdk-dev] [PATCH v2 0/2] test/distributor: perf burst mode quit fixes David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210428142553.1593546-3-kda@semihalf.com \
    --to=kda@semihalf.com \
    --cc=david.hunt@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=l.wojciechow@partner.samsung.com \
    --cc=upstream@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).