From: Stephen Hemminger Subject: [RFC 3/5] examples/bond: use lcore accessor Date: Wed, 3 Apr 2019 10:16:08 -0700 Message-ID: <20190403171610.23970-4-stephen@networkplumber.org> References: <20190403171610.23970-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by dpdk.org (Postfix) with ESMTP id 6B0241B508 for ; Wed, 3 Apr 2019 19:16:20 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id y3so8633868pgk.12 for ; Wed, 03 Apr 2019 10:16:20 -0700 (PDT) In-Reply-To: <20190403171610.23970-1-stephen@networkplumber.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Refering to lcore_config directly is no longer recommended. Signed-off-by: Stephen Hemminger --- 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