[1/9] eal: eal stub to support parsing feature on windows

Message ID 20190909195404.4760-2-pallavi.kadam@intel.com
State New
Delegated to: Thomas Monjalon
Headers show
Series
  • [1/9] eal: eal stub to support parsing feature on windows
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance success Performance Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/checkpatch success coding style OK

Commit Message

Pallavi Kadam Sept. 9, 2019, 7:53 p.m.
Adding initial stub to support command line parsing
for lcore mask option on Windows.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Signed-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
---
 lib/librte_eal/windows/eal/eal.c        | 29 ++++++++++++++++++++++---
 lib/librte_eal/windows/eal/eal_thread.c |  8 +++++++
 2 files changed, 34 insertions(+), 3 deletions(-)

Patch

diff --git a/lib/librte_eal/windows/eal/eal.c b/lib/librte_eal/windows/eal/eal.c
index ce460481f..83907ffa6 100644
--- a/lib/librte_eal/windows/eal/eal.c
+++ b/lib/librte_eal/windows/eal/eal.c
@@ -24,6 +24,23 @@  rte_eal_get_configuration(void)
 	return &rte_config;
 }
 
+/* Parse the arguments for --log-level only */
+static void
+eal_log_level_parse(__rte_unused int argc, __rte_unused char **argv)
+{
+	/* TODO */
+	/* This is a stub, not the expected result */
+}
+
+/* Parse the argument given in the command line of the application */
+static int
+eal_parse_args(__rte_unused int argc, __rte_unused char **argv)
+{
+	/* TODO */
+	/* This is a stub, not the expected result */
+	return 0;
+}
+
 static int
 sync_func(void *arg __rte_unused)
 {
@@ -39,9 +56,11 @@  rte_eal_init_alert(const char *msg)
 
  /* Launch threads, called at application init(). */
 int
-rte_eal_init(int argc __rte_unused, char **argv __rte_unused)
+rte_eal_init(int argc, char **argv)
 {
-	int i;
+	int i, fctret;
+
+	eal_log_level_parse(argc, argv);
 
 	/* create a map of all processors in the system */
 	eal_create_cpu_map();
@@ -52,6 +71,10 @@  rte_eal_init(int argc __rte_unused, char **argv __rte_unused)
 		return -1;
 	}
 
+	fctret = eal_parse_args(argc, argv);
+	if (fctret < 0)
+		exit(1);
+
 	eal_thread_init_master(rte_config.master_lcore);
 
 	RTE_LCORE_FOREACH_SLAVE(i) {
@@ -80,5 +103,5 @@  rte_eal_init(int argc __rte_unused, char **argv __rte_unused)
 	 */
 	rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
 	rte_eal_mp_wait_lcore();
-	return 0;
+	return fctret;
 }
diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c
index 906502f90..6e5e6f4ab 100644
--- a/lib/librte_eal/windows/eal/eal_thread.c
+++ b/lib/librte_eal/windows/eal/eal_thread.c
@@ -151,3 +151,11 @@  eal_thread_create(pthread_t *thread)
 
 	return 0;
 }
+
+int
+rte_thread_setname(__rte_unused pthread_t id, __rte_unused const char *name)
+{
+	/* TODO */
+	/* This is a stub, not the expected result */
+	return 0;
+}