From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id F06681B216 for ; Wed, 10 Apr 2019 19:16:13 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id y3so1920210pgk.12 for ; Wed, 10 Apr 2019 10:16:13 -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=TkYkcALPk4MakSkI3b+Pt2ndeQC2ArGo5b1XNL5Kw08=; b=1yj/n7mpKqlr83fWClF+ZT+WOjgVNCArUj1z2fS5BxkSN6P26bUR6oVw/X2ZejPLtj 876CoVM49FDWMO7XLECaS8zMzEckfBsFt6oChh14oqbyL01FJ8+PFexKZ+SEpunHtSGM G9WhA/wSndpwfpCBOv7vkGP8U91klql8OiOKrGbLxZNGY8R0z8QhUxTo9V+4TlhZFpGj emMmNzj3VqDGTxrKYtIaaSjaZ52PVjg2OOq/te024VQK82bYqU0BnBvXf1NUx8uoJoKv vwEmNhKu9sZGMpULJqggNxMLxPgYcjbSYPlUarP83exvUWKnqUFhyeueBQiVq9OvG1xL swjQ== 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=TkYkcALPk4MakSkI3b+Pt2ndeQC2ArGo5b1XNL5Kw08=; b=kcjnAy1vAn4E/TOKQ1EnCvRYl7jVtX+2D9jO+lsacAqLK5KSPuSTNqZpSjLrpSX9ZR 2RA9iB+Ii8c1tG6Vz1sOZj47Uz9/4tBqEu2MaPtbZPgemu92bMsM9a2uGNUoE6lKb0R0 lf5sU27IZ9nFyoXAEVRVTN39WcsK2mcvBKH+Rqu2h2PRhkSCltVyExg0Jg5h9GWTklf0 dPjDlQr/YXAZuyE7l+erf4cNWKM61krkoyVcY/jVE2PcVg1Ro3SKqMRhJ/zdiLOVgLpE 9/4V7E8fxSEbwVpMX5emj3B6n1n8CTknow8KjzzRsXmfKeW7/sC9ZNqvG3xVXkTLFJUE /wiQ== X-Gm-Message-State: APjAAAWGrOLI0B+1spI/InPz2E7dXv3RlUYgukwpkvfj1K+SqnjYIrgS CqRVk4QfkKGcWp+54AdiTezQyQwQ5MA= X-Google-Smtp-Source: APXvYqxdS7zwFZpci50rw31Xs/t9lH+S5F8nHO9pmrdNiXtv54ZRjI5ZBX85E0rDpsmFx/l5+DUmHw== X-Received: by 2002:a65:420b:: with SMTP id c11mr42342644pgq.24.1554916572925; Wed, 10 Apr 2019 10:16:12 -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 d25sm48995244pfn.154.2019.04.10.10.16.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 10:16:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 10 Apr 2019 10:16:02 -0700 Message-Id: <20190410171603.8979-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190410171603.8979-1-stephen@networkplumber.org> References: <20190408182510.16078-1-stephen@networkplumber.org> <20190410171603.8979-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v2 4/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: , X-List-Received-Date: Wed, 10 Apr 2019 17:16:14 -0000 Referring to lcore_config directly is no longer recommended. Signed-off-by: Stephen Hemminger --- examples/bond/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/bond/main.c b/examples/bond/main.c index ef86194fff4a..b047ab23f01d 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -526,8 +526,9 @@ 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_eal_get_lcore_state(global_flag_stru_p->LcoreMainCore) + != WAIT) { rte_spinlock_unlock(&global_flag_stru_p->lock); return; } -- 2.17.1 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 7F6A1A0096 for ; Wed, 10 Apr 2019 19:16:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C81CF1B399; Wed, 10 Apr 2019 19:16:23 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id F06681B216 for ; Wed, 10 Apr 2019 19:16:13 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id y3so1920210pgk.12 for ; Wed, 10 Apr 2019 10:16:13 -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=TkYkcALPk4MakSkI3b+Pt2ndeQC2ArGo5b1XNL5Kw08=; b=1yj/n7mpKqlr83fWClF+ZT+WOjgVNCArUj1z2fS5BxkSN6P26bUR6oVw/X2ZejPLtj 876CoVM49FDWMO7XLECaS8zMzEckfBsFt6oChh14oqbyL01FJ8+PFexKZ+SEpunHtSGM G9WhA/wSndpwfpCBOv7vkGP8U91klql8OiOKrGbLxZNGY8R0z8QhUxTo9V+4TlhZFpGj emMmNzj3VqDGTxrKYtIaaSjaZ52PVjg2OOq/te024VQK82bYqU0BnBvXf1NUx8uoJoKv vwEmNhKu9sZGMpULJqggNxMLxPgYcjbSYPlUarP83exvUWKnqUFhyeueBQiVq9OvG1xL swjQ== 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=TkYkcALPk4MakSkI3b+Pt2ndeQC2ArGo5b1XNL5Kw08=; b=kcjnAy1vAn4E/TOKQ1EnCvRYl7jVtX+2D9jO+lsacAqLK5KSPuSTNqZpSjLrpSX9ZR 2RA9iB+Ii8c1tG6Vz1sOZj47Uz9/4tBqEu2MaPtbZPgemu92bMsM9a2uGNUoE6lKb0R0 lf5sU27IZ9nFyoXAEVRVTN39WcsK2mcvBKH+Rqu2h2PRhkSCltVyExg0Jg5h9GWTklf0 dPjDlQr/YXAZuyE7l+erf4cNWKM61krkoyVcY/jVE2PcVg1Ro3SKqMRhJ/zdiLOVgLpE 9/4V7E8fxSEbwVpMX5emj3B6n1n8CTknow8KjzzRsXmfKeW7/sC9ZNqvG3xVXkTLFJUE /wiQ== X-Gm-Message-State: APjAAAWGrOLI0B+1spI/InPz2E7dXv3RlUYgukwpkvfj1K+SqnjYIrgS CqRVk4QfkKGcWp+54AdiTezQyQwQ5MA= X-Google-Smtp-Source: APXvYqxdS7zwFZpci50rw31Xs/t9lH+S5F8nHO9pmrdNiXtv54ZRjI5ZBX85E0rDpsmFx/l5+DUmHw== X-Received: by 2002:a65:420b:: with SMTP id c11mr42342644pgq.24.1554916572925; Wed, 10 Apr 2019 10:16:12 -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 d25sm48995244pfn.154.2019.04.10.10.16.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 10:16:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 10 Apr 2019 10:16:02 -0700 Message-Id: <20190410171603.8979-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190410171603.8979-1-stephen@networkplumber.org> References: <20190408182510.16078-1-stephen@networkplumber.org> <20190410171603.8979-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v2 4/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: <20190410171602.cIPCe-aw9mZ1N7ttikRtT1T_YEi7dTy22wMyDwQtOXY@z> Referring to lcore_config directly is no longer recommended. Signed-off-by: Stephen Hemminger --- examples/bond/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/bond/main.c b/examples/bond/main.c index ef86194fff4a..b047ab23f01d 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -526,8 +526,9 @@ 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_eal_get_lcore_state(global_flag_stru_p->LcoreMainCore) + != WAIT) { rte_spinlock_unlock(&global_flag_stru_p->lock); return; } -- 2.17.1