From patchwork Thu Sep 15 03:39:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sevincer, Abdullah" X-Patchwork-Id: 116319 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A010A0032; Thu, 15 Sep 2022 05:39:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0367A4021D; Thu, 15 Sep 2022 05:39:38 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 3D09340156 for ; Thu, 15 Sep 2022 05:39:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663213176; x=1694749176; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qG4VUw2MYBWfJHnaP/k9HU1jtW632M7ohxVLDmmBsU4=; b=bK+TRCMdpk45Kwplkm9rpqwoXoW7cbWOHFRO5QxCV/ZU4EMxKnlLLYjN hFqLD0OAYfn/OgFAViVGOhV/bhlTesmbzkrCoaseDBtaw+PKjmFOpiSgP B1w6mK/szB8ARx5v6nXfMZbtZV4Bl0wsEQKigBe5N/uvPwF4fMDUImJIt D0XLqnO9zLYxkFbHhxUVEdy2WkjhC/yXNNcbkbuq60qQVy66BMjQf39pO u2ivMjlzEmSpXmU4DnGFw2/wu4FSN8KKDxWBJ46swaqx5RmLUHwJM2CYd lLvO0FCTACbOrBkas/qcW3N/ww97uOutQfG/SJCMMuLpm7r6kU6ub0vfL w==; X-IronPort-AV: E=McAfee;i="6500,9779,10470"; a="278987563" X-IronPort-AV: E=Sophos;i="5.93,316,1654585200"; d="scan'208";a="278987563" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 20:39:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,316,1654585200"; d="scan'208";a="679331785" Received: from txanpdk02.an.intel.com ([10.123.117.76]) by fmsmga008.fm.intel.com with ESMTP; 14 Sep 2022 20:39:31 -0700 From: Abdullah Sevincer To: dev@dpdk.org Cc: Abdullah Sevincer Subject: [PATCH] eal: make eal_parse_coremask external Date: Wed, 14 Sep 2022 22:39:19 -0500 Message-Id: <20220915033919.4134000-1-abdullah.sevincer@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220819223301.2980316-1-timothy.mcdaniel@intel.com> References: <20220819223301.2980316-1-timothy.mcdaniel@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org DLB2 has a need to parse a user supplied coremask as part of an optimization that associates optimal core/resource pairs. Therefore eal_parse_coremask has been renamed to rte_eal_parse_coremask and exported. Signed-off-by: Abdullah Sevincer --- lib/eal/common/eal_common_options.c | 6 +++--- lib/eal/common/eal_options.h | 2 ++ lib/eal/version.map | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c index 4c2def0155..2d6535781b 100644 --- a/lib/eal/common/eal_common_options.c +++ b/lib/eal/common/eal_common_options.c @@ -742,8 +742,8 @@ check_core_list(int *lcores, unsigned int count) return -1; } -static int -eal_parse_coremask(const char *coremask, int *cores) +int +rte_eal_parse_coremask(const char *coremask, int *cores) { const char *coremask_orig = coremask; int lcores[RTE_MAX_LCORE]; @@ -1649,7 +1649,7 @@ eal_parse_common_option(int opt, const char *optarg, if (eal_service_cores_parsed()) RTE_LOG(WARNING, EAL, "Service cores parsed before dataplane cores. Please ensure -c is before -s or -S\n"); - if (eal_parse_coremask(optarg, lcore_indexes) < 0) { + if (rte_eal_parse_coremask(optarg, lcore_indexes) < 0) { RTE_LOG(ERR, EAL, "invalid coremask syntax\n"); return -1; } diff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h index 3cc9cb6412..0cfb57cd1f 100644 --- a/lib/eal/common/eal_options.h +++ b/lib/eal/common/eal_options.h @@ -108,5 +108,7 @@ int eal_plugins_init(void); int eal_save_args(int argc, char **argv); int handle_eal_info_request(const char *cmd, const char *params __rte_unused, struct rte_tel_data *d); +__rte_internal +int rte_eal_parse_coremask(const char *coremask, int *cores); #endif /* EAL_OPTIONS_H */ diff --git a/lib/eal/version.map b/lib/eal/version.map index 1f293e768b..c643bc1612 100644 --- a/lib/eal/version.map +++ b/lib/eal/version.map @@ -464,4 +464,5 @@ INTERNAL { rte_mem_map; rte_mem_page_size; rte_mem_unmap; + rte_eal_parse_coremask; };