From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E64AA0C3F; Wed, 28 Apr 2021 16:28:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38A1A412B7; Wed, 28 Apr 2021 16:28:39 +0200 (CEST) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mails.dpdk.org (Postfix) with ESMTP id 8197F40147 for ; Wed, 28 Apr 2021 16:28:36 +0200 (CEST) Received: by mail-lj1-f175.google.com with SMTP id o5so39386970ljc.1 for ; Wed, 28 Apr 2021 07:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SXAAQ+CK3NA0Epv0wskpT+80qVV7+yewMy51V394ItM=; b=IL9UKPsoMGeXtW2eplxSL1/ZlWveV4wOjRwvo4tpMSYlSW+5zSMIUi3TH5VFrwnLgD GobT24wc2shRC1GL+ktSTRPoWbw5DVpRkXQyrAUb5rBtOpmFQDCjIAdBXe7GTVoIHHq7 xU9WLI8cZf5CgojsclCLmZRh548QCXyzTXmjKLG+CkFZ1KAJhqSWNcaLG1WMQgLnvW4P LqRDE4AiYSJhWuT2U1AUAMxf0oGgobd3HAyAV7Af4TE4/wcwyZmSuOQWH/LdSrD2j/ra Dga9NeN5o8va7rGGavwYpcyktbLMj4DinW7udtuUilwGBufWy5q9riyVwB3skFZ7qQkQ eGcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SXAAQ+CK3NA0Epv0wskpT+80qVV7+yewMy51V394ItM=; b=fLZCu7sXb01pk1v+DCdoIgx6I7MhT6ES3uHiiV6UqxOrhd3Ga4GKrw7c8lS0QcOvH1 9JpCm5mCu2TIlVT/oAfTw2M5gsY0nuIkOAwY4KVLBgPdrLXUIqvnahSuLbWyfF8kVAKL cZ8oHBqaZ2AgzVCzxODSeh2I42/a8COUszjiu3bSe/K5SRAJNrL8ViJKenrnkG3fGL61 ek/yMFZu8EiQkaru+P3FCRCxm2z1d8+bZImayKXckXk+XJIJ6OCK3jqi5SuwNOFolz/U dmnirfFwXO0BQtldvQKF9SfwDQ7+L8CMQCcz3+tVGRr0NMAHwe0uEB0+xHZqX19oHlAF Tdtw== X-Gm-Message-State: AOAM532OyiheU2mXZZUEZUeVTS+eEp6nzDlq85SD60u8GafLDskbBlr2 qlviZygM3+tl/pKTBP9IhHmyyLqdHrjkUy1x X-Google-Smtp-Source: ABdhPJwlGC/X1i3gLp43CGkryXBVdForcIMUCqtkrOed/nhSvecshGHC7VY8zSZ3c3ml/N4gfq6lig== X-Received: by 2002:a2e:9659:: with SMTP id z25mr20890107ljh.188.1619620116146; Wed, 28 Apr 2021 07:28:36 -0700 (PDT) Received: from localhost.localdomain (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id e15sm1204409lja.14.2021.04.28.07.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 07:28:35 -0700 (PDT) From: Stanislaw Kardach To: dev@dpdk.org, david.hunt@intel.com Cc: upstream@semihalf.com, l.wojciechow@partner.samsung.com, Stanislaw Kardach , David Marchand Date: Wed, 28 Apr 2021 16:25:53 +0200 Message-Id: <20210428142553.1593546-3-kda@semihalf.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210428142553.1593546-1-kda@semihalf.com> References: <20210426163310.1043438-1-kda@semihalf.com> <20210428142553.1593546-1-kda@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/2] test/distributor: fix burst flush on worker quit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Stanislaw Kardach Acked-by: David Hunt Tested-by: Lukasz Wojciechowski Reviewed-by: Lukasz Wojciechowski --- 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