From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9692AC4740C for ; Mon, 9 Sep 2019 20:19:00 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 30F3920674 for ; Mon, 9 Sep 2019 20:19:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30F3920674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AC201EC65; Mon, 9 Sep 2019 22:18:51 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 89DAE1C07B for ; Mon, 9 Sep 2019 22:18:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2019 13:18:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,487,1559545200"; d="scan'208";a="385086184" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.58]) by fmsmga006.fm.intel.com with ESMTP; 09 Sep 2019 13:18:46 -0700 From: Pallavi Kadam To: dev@dpdk.org, thomas@monjalon.net Cc: Harini.Ramakrishnan@microsoft.com, ranjit.menon@intel.com, keith.wiles@intel.com, bruce.richardson@intel.com, antara.ganesh.kolar@intel.com, pallavi.kadam@intel.com Date: Mon, 9 Sep 2019 12:53:56 -0700 Message-Id: <20190909195404.4760-2-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20190909195404.4760-1-pallavi.kadam@intel.com> References: <20190906220957.7892-1-pallavi.kadam@intel.com> <20190909195404.4760-1-pallavi.kadam@intel.com> Subject: [dpdk-dev] [PATCH 1/9] eal: eal stub to support parsing feature on windows 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adding initial stub to support command line parsing for lcore mask option on Windows. Signed-off-by: Pallavi Kadam Signed-off-by: Antara Ganesh Kolar Reviewed-by: Ranjit Menon Reviewed-by: Keith Wiles --- lib/librte_eal/windows/eal/eal.c | 29 ++++++++++++++++++++++--- lib/librte_eal/windows/eal/eal_thread.c | 8 +++++++ 2 files changed, 34 insertions(+), 3 deletions(-) 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; +} -- 2.18.0.windows.1