From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com,
Dharmik Thakkar <dharmik.thakkar@arm.com>,
stable@dpdk.org, Yipeng Wang <yipeng1.wang@intel.com>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: [dpdk-dev] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores
Date: Tue, 4 Jun 2019 10:59:43 +0200 [thread overview]
Message-ID: <1559638792-8608-6-git-send-email-david.marchand@redhat.com> (raw)
In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
From: Dharmik Thakkar <dharmik.thakkar@arm.com>
This patch rectifies slave_id to point to valid core indexes rather than
core ranks in read-write lock-free concurrency test.
It also replaces a 'for' loop with RTE_LCORE_FOREACH API.
Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_hash_readwrite_lf.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c
index f9f233a..5644361 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf.c
@@ -126,11 +126,9 @@ struct {
uint32_t i = 0;
uint16_t core_id;
uint32_t max_cores = rte_lcore_count();
- for (core_id = 0; core_id < RTE_MAX_LCORE && i < max_cores; core_id++) {
- if (rte_lcore_is_enabled(core_id)) {
- enabled_core_ids[i] = core_id;
- i++;
- }
+ RTE_LCORE_FOREACH(core_id) {
+ enabled_core_ids[i] = core_id;
+ i++;
}
if (i != max_cores) {
@@ -738,7 +736,7 @@ struct {
enabled_core_ids[i]);
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
@@ -810,7 +808,7 @@ struct {
if (ret < 0)
goto err;
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
@@ -886,7 +884,7 @@ struct {
if (ret < 0)
goto err;
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
@@ -962,7 +960,7 @@ struct {
if (ret < 0)
goto err;
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
@@ -1037,7 +1035,7 @@ struct {
if (ret < 0)
goto err;
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
@@ -1132,12 +1130,12 @@ struct {
for (i = rwc_core_cnt[n] + 1;
i <= rwc_core_cnt[m] + rwc_core_cnt[n];
i++)
- rte_eal_wait_lcore(i);
+ rte_eal_wait_lcore(enabled_core_ids[i]);
writer_done = 1;
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
@@ -1221,7 +1219,7 @@ struct {
writer_done = 1;
for (i = 1; i <= rwc_core_cnt[n]; i++)
- if (rte_eal_wait_lcore(i) < 0)
+ if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
goto err;
unsigned long long cycles_per_lookup =
--
1.8.3.1
next prev parent reply other threads:[~2019-06-04 9:00 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 8:59 [dpdk-dev] [PATCH 00/14] Unit tests fixes for CI David Marchand
2019-06-04 8:59 ` [dpdk-dev] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS David Marchand
2019-06-04 12:59 ` Aaron Conole
2019-06-04 8:59 ` [dpdk-dev] [PATCH 02/14] test/crypto: move tests to the driver specific list David Marchand
2019-06-04 13:00 ` Aaron Conole
2019-06-04 8:59 ` [dpdk-dev] [PATCH 03/14] test/eventdev: " David Marchand
2019-06-04 13:04 ` Aaron Conole
2019-06-04 8:59 ` [dpdk-dev] [PATCH 04/14] test/hash: fix off-by-one check on core count David Marchand
2019-06-04 13:05 ` Aaron Conole
2019-06-05 20:02 ` Wang, Yipeng1
2019-06-04 8:59 ` David Marchand [this message]
2019-06-05 20:02 ` [dpdk-dev] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores Wang, Yipeng1
2019-06-04 8:59 ` [dpdk-dev] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest David Marchand
2019-06-04 13:31 ` Aaron Conole
2019-06-04 8:59 ` [dpdk-dev] [PATCH 07/14] test/latencystats: fix stack smashing David Marchand
2019-06-04 13:38 ` Aaron Conole
2019-06-04 8:59 ` [dpdk-dev] [PATCH 08/14] test/stack: fix lock-free test name David Marchand
2019-06-04 13:06 ` Aaron Conole
2019-06-04 8:59 ` [dpdk-dev] [PATCH 09/14] test/eal: set memory channel config only in dedicated test David Marchand
2019-06-04 13:11 ` Aaron Conole
2019-06-26 9:44 ` Burakov, Anatoly
2019-06-04 8:59 ` [dpdk-dev] [PATCH 10/14] test/eal: set core mask/list " David Marchand
2019-06-04 13:12 ` Aaron Conole
2019-06-26 9:45 ` Burakov, Anatoly
2019-06-04 8:59 ` [dpdk-dev] [PATCH 11/14] test/eal: check number of cores before running subtests David Marchand
2019-06-04 13:26 ` Aaron Conole
2019-06-26 9:47 ` Burakov, Anatoly
2019-06-04 8:59 ` [dpdk-dev] [PATCH 12/14] test/eal: make the test pass again David Marchand
2019-06-04 13:29 ` Aaron Conole
2019-06-04 13:50 ` David Marchand
2019-06-26 9:49 ` Burakov, Anatoly
2019-06-26 10:03 ` David Marchand
2019-06-04 8:59 ` [dpdk-dev] [PATCH 13/14] test: do not start tests in parallel David Marchand
2019-06-04 8:59 ` [dpdk-dev] [PATCH 14/14] test: skip tests when missing requirements David Marchand
2019-06-07 20:54 ` Honnappa Nagarahalli
2019-06-08 8:01 ` David Marchand
2019-06-11 4:08 ` Honnappa Nagarahalli
2019-06-04 15:49 ` [dpdk-dev] [PATCH 00/14] Unit tests fixes for CI Michael Santana Francisco
2019-06-27 16:34 ` Thomas Monjalon
2019-07-01 12:17 ` Aaron Conole
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 00/15] " David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 01/15] test/bonding: add missing sources for link bonding RSS David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 02/15] test/crypto: move tests to the driver specific list David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 03/15] test/eventdev: " David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 04/15] test/hash: fix off-by-one check on core count David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 05/15] test/hash: rectify slaveid to point to valid cores David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 06/15] test/hash: clean remaining trace of scaling autotest David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 07/15] test/latencystats: fix stack smashing David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count David Marchand
2019-06-28 12:56 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-06-28 13:32 ` David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 09/15] test/stack: fix lock-free test name David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 10/15] test/eal: set memory channel config only in dedicated test David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 11/15] test/eal: set core mask/list " David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 12/15] test/eal: check number of cores before running subtests David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 13/15] test: split into shorter subtests for CI David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 14/15] test: do not start tests in parallel David Marchand
2019-06-15 6:42 ` [dpdk-dev] [PATCH v2 15/15] test: skip tests when missing requirements David Marchand
2019-06-17 10:00 ` [dpdk-dev] [PATCH v2 00/15] Unit tests fixes for CI Bruce Richardson
2019-06-17 10:46 ` David Marchand
2019-06-17 11:17 ` Bruce Richardson
2019-06-17 11:41 ` David Marchand
2019-06-17 11:56 ` Bruce Richardson
2019-06-17 13:44 ` David Marchand
2019-06-27 20:36 ` Thomas Monjalon
2019-07-01 16:04 ` Aaron Conole
2019-07-01 16:22 ` Thomas Monjalon
2019-07-01 16:45 ` David Marchand
2019-07-01 18:07 ` Michael Santana Francisco
2019-07-09 15:50 ` Michael Santana Francisco
2019-07-10 8:18 ` 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=1559638792-8608-6-git-send-email-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=aconole@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dharmik.thakkar@arm.com \
--cc=msantana@redhat.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=sameh.gobriel@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
--cc=yipeng1.wang@intel.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).