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 392E8A00E6 for ; Wed, 15 May 2019 09:54:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 319455F1B; Wed, 15 May 2019 09:54:45 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E4A0F5A4A; Wed, 15 May 2019 09:54:41 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 48E6F307D92F; Wed, 15 May 2019 07:54:41 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-80.ams2.redhat.com [10.36.116.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id D97F15D6A6; Wed, 15 May 2019 07:54:39 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, stephen@networkplumber.org, stable@dpdk.org, Cristian Dumitrescu Date: Wed, 15 May 2019 09:54:22 +0200 Message-Id: <1557906862-1116-4-git-send-email-david.marchand@redhat.com> In-Reply-To: <1557906862-1116-1-git-send-email-david.marchand@redhat.com> References: <1557906862-1116-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 15 May 2019 07:54:41 +0000 (UTC) Subject: [dpdk-stable] [PATCH 4/4] examples/qos_sched: do not dereference global config struct X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Prefer the existing apis rather than direct access the configuration structure. Fixes: de3cfa2c9823 ("sched: initial import") Cc: stable@dpdk.org Signed-off-by: David Marchand --- examples/qos_sched/args.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index 83eee95..7431b29 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -90,16 +90,15 @@ static inline int str_is(const char *str, const char *is) static uint64_t app_eal_core_mask(void) { - uint32_t i; uint64_t cm = 0; - struct rte_config *cfg = rte_eal_get_configuration(); + uint32_t i; for (i = 0; i < APP_MAX_LCORE; i++) { - if (cfg->lcore_role[i] == ROLE_RTE) + if (rte_lcore_has_role(i, ROLE_RTE)) cm |= (1ULL << i); } - cm |= (1ULL << cfg->master_lcore); + cm |= (1ULL << rte_get_master_lcore()); return cm; } -- 1.8.3.1