From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0041.outbound.protection.outlook.com [104.47.40.41]) by dpdk.org (Postfix) with ESMTP id 77CD12951 for ; Thu, 4 Jan 2018 09:47:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mqxo/FTUcY+pV8XuJVMQBOHm9ZZo+B6Qw2r9kncGEy0=; b=Xx0ho2NtBen63kGC3whZlTkgLeIgat/TJYzxpYIJeLCSEJFpux4m6/iPxfM15VvA5bLe/wlW/eVp5R3knFWfz4vUxZaY9tUyOLGxByZSAHOGjTD95IaCBJwCSX6Q/DlSwAz0oxppuxT9hWLfncPGVs3Fkt86C+xtzYFTDfnvdPI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (111.93.218.67) by MWHPR07MB3470.namprd07.prod.outlook.com (10.164.192.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Thu, 4 Jan 2018 08:47:55 +0000 Date: Thu, 4 Jan 2018 14:17:45 +0530 From: Pavan Nikhilesh To: Erik Gabriel Carrillo , harry.van.haaren@intel.com Cc: dev@dpdk.org Message-ID: <20180104084744.5o355aweb6g232oc@Pavan-LT> References: <1515005015-31990-1-git-send-email-erik.g.carrillo@intel.com> <1515005015-31990-2-git-send-email-erik.g.carrillo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515005015-31990-2-git-send-email-erik.g.carrillo@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR2201CA0055.namprd22.prod.outlook.com (10.172.59.29) To MWHPR07MB3470.namprd07.prod.outlook.com (10.164.192.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e608f081-44f2-4499-04eb-08d5534fd9d3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:MWHPR07MB3470; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3470; 3:IYHxvzLJsSd06y1KjLhYI/z42B5+wAqld+TjQTuiXd6M8rmhjYooP9k3wTBd/VLeefZ9WX8s2ZqRADe8y3yuHG0+E3N3CRXLm09UAUjPWTb0apZXrwzRruDYUZU+7U901bIfkJ+SCZz4mIyheV337IjGKGjf7IRiMrjdTQBwTcWNrI+5AKCF+e8IAgfDGUXOalAhJwcB7kXIk9bqKdVr9mneN+mlQbU35ySTL1w5i1mXA7+YGfFh+n3/JFLIMgRJ; 25:YaOdnyGf8YAHVLSIqxepy1K4lWDQkZtlwyLdVW7GkAWOn7JDEwuspV9R3toopYHUaDKHVkViQPM2Pweg+4hu4eLL3qZ21RpSugVRl2ybZMVoH6knnM1EtnBcH0mE/uin8Zg0DmXE130fbOuW8D2D61YFWa6L15rX6kdztBU/l5nzKtmFtdFExBT1feGSUQJNfOM78xu4suLpkqgmGIADU6ZBhFwGktB+kc2g5iYkPAjayZxS4KzpgAesGDl/al5mIUjoSt/P9aBVRk0+m72jrRpM6MYo74k+NEuOD/uHVQqHRY6w7WknOC/LiLMTaurN3h6+eSd20m/4viZDg+7hhA==; 31:CvBHluP5kiGFLPsyITp+NPnKHnlDM2Y4qe0xYB9qj66Jz01X97MGW9VqZX4v0yHyZ9O/0OBwqpjBX4Nwckk/YJJkCXpJNeU3G7p5cIWbJ7wW6SktZRXeTgRuBOk/e7J5ufp6LIhszo8FQa2CZWRX4YJMQ/T+xlp4jVzqRhMacnee6O6tGWlmitioIE/gXdlddWQMDs496dvdd7KQKSJ5K+w2G98uR9ujFJZfya4pOY8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959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(3231023)(944501075)(3002001)(10201501046)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR07MB3470; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR07MB3470; X-Forefront-PRVS: 054231DC40 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39850400004)(39380400002)(346002)(376002)(189003)(199004)(24454002)(8936002)(4326008)(72206003)(81166006)(81156014)(8676002)(3846002)(478600001)(33716001)(6496006)(59450400001)(33896004)(5660300001)(6116002)(52116002)(1076002)(386003)(68736007)(106356001)(23726003)(105586002)(76176011)(25786009)(305945005)(229853002)(55016002)(16526018)(9686003)(47776003)(5009440100003)(53936002)(58126008)(7736002)(66066001)(83506002)(316002)(16586007)(2950100002)(42882006)(6666003)(97736004)(6246003)(2906002)(50466002)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3470; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3470; 23:9AEOe0Rt1mAZzuuZC/zYDOqRSmyFJqM/tYvRRQZL4?= =?us-ascii?Q?hKmtlLGkC1toURrucXZRPzrHgHOc90k0BddMT6NrDmeR4YhGWQFRNno7NBeS?= =?us-ascii?Q?eB6+b4q5tgbG0pfTCEIKTns0oJ83cVrbZBvTvXcVTGZp30CRaWH3l3oO0jKF?= =?us-ascii?Q?kyL0V2/AK9E74oe/pMAy6H0hHd7C9M9iAWB8AWnf/JAZ4MXm4cwZ2H+608kn?= =?us-ascii?Q?Dp/F20Lf/WKQI78S706PTGjjQYoBCfTOwIZ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+2FBLBKKdlkZgxG2c3BN1qW384BQ11DxDWfnvmPvpP9GioEeSfn09+ATbZo9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2018 08:47:55.0268 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e608f081-44f2-4499-04eb-08d5534fd9d3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3470 Subject: Re: [dpdk-dev] [PATCH 1/1] eal: return true or false from lcore role check function 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: Thu, 04 Jan 2018 08:47:59 -0000 On Wed, Jan 03, 2018 at 12:43:35PM -0600, Erik Gabriel Carrillo wrote: > Update rte_lcore_has_role() so that it returns true/false instead of > success/failure. > > Fixes: 78666372fa2b ("eal: add function to check lcore role") > > Signed-off-by: Erik Gabriel Carrillo > --- > lib/librte_eal/common/eal_common_thread.c | 5 +---- > lib/librte_eal/common/include/rte_lcore.h | 2 +- > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c > index 55e9696..28ee6d0 100644 > --- a/lib/librte_eal/common/eal_common_thread.c > +++ b/lib/librte_eal/common/eal_common_thread.c > @@ -59,12 +59,9 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role) > struct rte_config *cfg = rte_eal_get_configuration(); > > if (lcore_id >= RTE_MAX_LCORE) > - return -EINVAL; > - > - if (cfg->lcore_role[lcore_id] == role) > return 0; > > - return -EINVAL; > + return cfg->lcore_role[lcore_id] == role; > } > > int eal_cpuset_socket_id(rte_cpuset_t *cpusetp) > diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h > index c89e6ba..fba04f1 100644 > --- a/lib/librte_eal/common/include/rte_lcore.h > +++ b/lib/librte_eal/common/include/rte_lcore.h > @@ -271,7 +271,7 @@ int rte_thread_setname(pthread_t id, const char *name); > * @param role > * The role to be checked against. > * @return > - * On success, return 0; otherwise return a negative value. > + * True if the given core has the specified role; false otherwise. > */ > int > rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role); > -- > 2.6.4 > LGTM. Acked-by: Pavan Nikhilesh