DPDK patches and discussions
 help / color / mirror / Atom feed
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
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	[thread overview]
Message-ID: <20220819223301.2980316-1-timothy.mcdaniel@intel.com> (raw)

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 <timothy.mcdaniel@intel.com>
---
 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


             reply	other threads:[~2022-08-19 22:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 22:33 Timothy McDaniel [this message]
2022-08-20 10:00 ` Dmitry Kozlyuk
2022-09-15  3:39 ` Abdullah Sevincer
2022-09-23 10:36   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220819223301.2980316-1-timothy.mcdaniel@intel.com \
    --to=timothy.mcdaniel@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mdr@ashroe.eu \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).