DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dharmik Thakkar <Dharmik.Thakkar@arm.com>
To: David Marchand <david.marchand@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"stable@dpdk.org" <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>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] test/hash: use existing lcore API
Date: Tue, 28 May 2019 14:15:59 +0000	[thread overview]
Message-ID: <F4D62D31-14A6-45B9-B7A1-9D25F64296FA@arm.com> (raw)
In-Reply-To: <CAJFAV8xEqfMMsPWPbS6zshmBjvsmeWCftMA=8JCLn0fS1BzQ9w@mail.gmail.com>



> On May 27, 2019, at 5:15 AM, David Marchand <david.marchand@redhat.com> wrote:
> 
> Hello Dharmik,
Hi David,
> 
> On Wed, May 22, 2019 at 9:38 PM Dharmik Thakkar <Dharmik.Thakkar@arm.com> wrote:
> > On May 22, 2019, at 12:17 PM, David Marchand <david.marchand@redhat.com> wrote:
> > On Wed, May 22, 2019 at 6:27 PM Dharmik Thakkar <Dharmik.Thakkar@arm.com> wrote:
> > > @@ -738,10 +736,9 @@ struct {
> > >                               rte_eal_remote_launch(test_rwc_reader,
> > >                                               (void *)(uintptr_t)read_type,
> > >                                                       enabled_core_ids[i]);
> > > -                     rte_eal_mp_wait_lcore();
> > > 
> > >                       for (i = 1; i <= rwc_core_cnt[n]; i++)
> > > -                             if (lcore_config[i].ret < 0)
> > > +                             if (rte_eal_wait_lcore(i) < 0)
> > if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> > 
> > (There are similar changes in other functions too.
> > I realize that this is a separate issue than what the patch is aimed for.
> > If you see fit, please integrate it, else I will put out a patch once your patch has been merged.)
> > 
> > Indeed, reproduced.
> > 
> 
> Did you have a chance to look at this ?
> These loops could be reworked by using RTE_LCORE_FOREACH_SLAVE() (so that it automatically skips the master lcore) removing the need for enabled_core_ids[].
> 
Yes, I have tried to use RTE_LCORE_FOREACH_SLAVE() and eliminate enabled_core_ids[]. However, the code becomes quite complicated to read with if statements
within RTE_LCORE_FOREACH_SLAVE(), to break the loop (since not all slave cores are checked for). This is a snip from test_hash_multi_add_lookup():

					/* snip */
				RTE_LCORE_FOREACH_SLAVE(core_id) {
					if (i < rwc_core_cnt[n])
						rte_eal_remote_launch(test_rwc_reader,
								(void *)(uintptr_t)read_type,
								core_id);
					else if (i >= rwc_core_cnt[n] &&
						 i < (rwc_core_cnt[n] +
						 rwc_core_cnt[m])) {
						rte_eal_remote_launch(test_rwc_multi_writer,
							(void *)(uintptr_t)pos_core,
							core_id);
						pos_core++;
					} else
						break;
					i++;
				}
> 
> -- 
> David Marchand


  reply	other threads:[~2019-05-28 14:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15  7:56 [dpdk-dev] [PATCH " David Marchand
2019-05-15  7:56 ` David Marchand
2019-05-15  7:57 ` [dpdk-dev] [PATCH 2/2] test/rcu: " David Marchand
2019-05-15  7:57   ` David Marchand
2019-05-15 12:19   ` Maxime Coquelin
2019-05-15 12:19     ` Maxime Coquelin
2019-05-15 20:04   ` Honnappa Nagarahalli
2019-05-15 20:04     ` Honnappa Nagarahalli
2019-05-15 12:14 ` [dpdk-dev] [PATCH 1/2] test/hash: " Maxime Coquelin
2019-05-15 12:14   ` Maxime Coquelin
2019-05-22  0:16 ` Wang, Yipeng1
2019-05-22 12:40   ` David Marchand
2019-05-22 15:06 ` [dpdk-dev] [PATCH v2 " David Marchand
2019-05-22 15:06   ` [dpdk-dev] [PATCH v2 2/2] test/rcu: " David Marchand
2019-05-23 14:20     ` Maxime Coquelin
2019-05-29 22:41       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-05-22 16:26   ` [dpdk-dev] [PATCH v2 1/2] test/hash: " Dharmik Thakkar
2019-05-22 17:17     ` David Marchand
2019-05-22 19:37       ` Dharmik Thakkar
2019-05-27 10:15         ` David Marchand
2019-05-28 14:15           ` Dharmik Thakkar [this message]
2019-05-23 12:48   ` Maxime Coquelin

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=F4D62D31-14A6-45B9-B7A1-9D25F64296FA@arm.com \
    --to=dharmik.thakkar@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=nd@arm.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=sameh.gobriel@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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).