From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41179A034C; Sat, 20 Aug 2022 00:33:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1956340693; Sat, 20 Aug 2022 00:33:12 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id D32E140223 for ; Sat, 20 Aug 2022 00:33:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660948390; x=1692484390; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=duZrUqL38QHe/jFsh/Qx7SgZ7bMdTY5fqDu/XbljH1k=; b=SSkbFdH0t4ODlYDdvY2bmVV+ed+g2/kadu0nEnJE9RuYACJwMPY80pWr jhbLVTE7cN1oEZoSqEBo3G7oqVwooN7DsTLVufjMuzCqWp5MlCRE7zhbP XZiXE68zhoqER2Wfuf/6zlH1Woh6s/HDbyjIdZkzMwsKen/cQiOIC4Zor nZDFDOL2ykSRXk/k90D4295DdMLBSlqEXcbt3wZkWrH7k7i0HWHAS5Xb0 LMnzTJwUA9KSt0WDb05tzC+fUhtoqF07mdvh/JtjOTKXaJhsf25RdK/ue H9wIY3yeMHLkLIQBLuj2Cqy15kjSvS8tanZiO5d8eAyPl9HjIsBtD3AJ3 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10444"; a="294386200" X-IronPort-AV: E=Sophos;i="5.93,249,1654585200"; d="scan'208";a="294386200" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2022 15:33:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,249,1654585200"; d="scan'208";a="668770033" Received: from txanpdk03.an.intel.com ([10.123.117.78]) by fmsmga008.fm.intel.com with ESMTP; 19 Aug 2022 15:33:07 -0700 From: Timothy McDaniel To: jerinj@marvell.com Cc: bruce.richardson@intel.com, mdr@ashroe.eu, thomas@monjalon.net, dev@dpdk.org Subject: [PATCH] eal: make eal_parse_coremask external Date: Fri, 19 Aug 2022 17:33:01 -0500 Message-Id: <20220819223301.2980316-1-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Timothy McDaniel --- lib/eal/common/eal_common_options.c | 6 +++--- lib/eal/common/eal_options.h | 2 ++ lib/eal/version.map | 3 +++ 3 files changed, 8 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..21df6886f8 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_experimental +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..3780853443 100644 --- a/lib/eal/version.map +++ b/lib/eal/version.map @@ -424,6 +424,9 @@ EXPERIMENTAL { rte_thread_self; rte_thread_set_affinity_by_id; rte_thread_set_priority; + + #added in 22.11 + rte_eal_parse_coremask; }; INTERNAL { -- 2.25.1