DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [RFC 3/5] examples/bond: use lcore accessor
Date: Wed,  3 Apr 2019 10:16:08 -0700	[thread overview]
Message-ID: <20190403171610.23970-4-stephen@networkplumber.org> (raw)
Message-ID: <20190403171608.rGbslUS67CogLbSnbIBJAXSPFM0CSaLkQF4MkV6O4sw@z> (raw)
In-Reply-To: <20190403171610.23970-1-stephen@networkplumber.org>

Refering to lcore_config directly is no longer recommended.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/bond/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index ef86194fff4a..48e6755ea294 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -526,8 +526,8 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
 	int slave_core_id = rte_lcore_id();
 
 	rte_spinlock_trylock(&global_flag_stru_p->lock);
-	if (global_flag_stru_p->LcoreMainIsRunning == 0)	{
-		if (lcore_config[global_flag_stru_p->LcoreMainCore].state != WAIT)	{
+	if (global_flag_stru_p->LcoreMainIsRunning == 0) {
+		if (rte_lcore_state(global_flag_stru_p->LcoreMainCore) != WAIT) {
 			rte_spinlock_unlock(&global_flag_stru_p->lock);
 			return;
 		}
-- 
2.17.1


  parent reply	other threads:[~2019-04-03 17:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 17:16 [dpdk-dev] [RFC 0/5] make lcore_config less visible Stephen Hemminger
2019-04-03 17:16 ` Stephen Hemminger
2019-04-03 17:16 ` [dpdk-dev] [RFC 1/5] eal: add accessor functions for lcore_config Stephen Hemminger
2019-04-03 17:16   ` Stephen Hemminger
2019-04-05 11:01   ` David Marchand
2019-04-05 11:01     ` David Marchand
2019-04-05 16:33     ` Stephen Hemminger
2019-04-05 16:33       ` Stephen Hemminger
2019-04-03 17:16 ` [dpdk-dev] [RFC 2/5] bus: use lcore accessor functions Stephen Hemminger
2019-04-03 17:16   ` Stephen Hemminger
2019-04-03 17:16 ` Stephen Hemminger [this message]
2019-04-03 17:16   ` [dpdk-dev] [RFC 3/5] examples/bond: use lcore accessor Stephen Hemminger
2019-04-03 17:16 ` [dpdk-dev] [RFC 4/5] app/test: use lcore accessor functions Stephen Hemminger
2019-04-03 17:16   ` Stephen Hemminger
2019-04-03 17:16 ` [dpdk-dev] [RFC 5/5] eal: make lcore_config private Stephen Hemminger
2019-04-03 17:16   ` Stephen Hemminger

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=20190403171610.23970-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /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).