From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CBA69A0096 for ; Mon, 8 Apr 2019 20:25:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B52FF58CB; Mon, 8 Apr 2019 20:25:26 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 91DCE4F91 for ; Mon, 8 Apr 2019 20:25:18 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id t16so7814763plo.0 for ; Mon, 08 Apr 2019 11:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0ThhFIn4SaOCY0Ee5dvp1///f0wyYwJ9V1lQ97ciQ+A=; b=MTlwafoVKrd9hl4QAqx3mTgenSg4JLPxMqd/0D/mXXapoiH35qqgLBS3SqoPn+Is6E iA3VBYizUopWYNrz1IDs8HXOj8GxP55Swb9lqMSucamPjoiGjmcCn2KTDt1biqKRxJHM kKQX7KHGt8c5lM0XTJSjpXRBgKsH28E+YEIDH9i1A86g5bUqfyHcN4QOM3UgPqai9Rue QdGqJBhg0A9ZilO7bJnUpbuQ2n1x85661CySThJe1L3CwbWiP/d392Tkoqy1mCNtpgaD /8cmsqPs4VbL62xYFyDyQ+QpkNUgRyiGUo5Yu70BS6uNyhT0tojE3qXu+tCTf6CZ3l/U 51Mg== 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; bh=0ThhFIn4SaOCY0Ee5dvp1///f0wyYwJ9V1lQ97ciQ+A=; b=R7dTfvO2a7S0mKmPP1w1q0TzwfDmlrfe/t4mFUGeh5BjtC2jIGKmT3U1nd9yGebxrm AjVhSfA837KoXkju0+Sd6P9gnnH0aew0Pc9YXz87w2vy8Cdyk4hwXjxWdvRDefr4nFZ9 wBqRwzMh8m7bsLSfpFUWMWqV/D82WC3SZRaU9q9oMQbWs18fy7xkkZYyV3cnJXXJys0q 1nONECV5t0Dw1i+57hw2HMG9elh+GPYM5iCuEJqX4uucsaPCp1uaf4C+qEIg1MHhxHt9 OX3GQLdx5NlNhYVqJcQK3qHvNsRz2QDiy3K78eW9xcNcumt5vSqlUGXXQ8h4xq/zKb8Y jwSA== X-Gm-Message-State: APjAAAUBRM/vqlKoGaDRROPBX5GC903Zgn5dpAjGKnrDJ1/5wS4yUmIL 2acAhshkdXhSJlYjc6o0QbNPVI3425W2ag== X-Google-Smtp-Source: APXvYqy4ujbAvD7IyeJieRsuA38TW52NuhaCrWTYY/VY7VHgt8+uf8eX1uTrWK0JI/TILyaZcQXM9Q== X-Received: by 2002:a17:902:d701:: with SMTP id w1mr32496165ply.124.1554747917496; Mon, 08 Apr 2019 11:25:17 -0700 (PDT) Received: from shemminger-XPS-13-9360.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d25sm40891081pfn.154.2019.04.08.11.25.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 11:25:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 8 Apr 2019 11:25:08 -0700 Message-Id: <20190408182510.16078-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190408182510.16078-1-stephen@networkplumber.org> References: <20190408182510.16078-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v1 3/5] examples/bond: use lcore accessor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190408182508.0D4Ho6sH7EUcuCWBh21TQLfUU73jBIJ0180QcwnEpdg@z> Use the accessor function to look at lcore state. 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