From patchwork Fri Jan 31 00:03:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kadam, Pallavi" X-Patchwork-Id: 65396 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA692A0524; Fri, 31 Jan 2020 01:05:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9111C1C0DD; Fri, 31 Jan 2020 01:04:18 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 41CDA1C044 for ; Fri, 31 Jan 2020 01:04:03 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2020 16:04:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,383,1574150400"; d="scan'208";a="262364584" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.75]) by fmsmga002.fm.intel.com with ESMTP; 30 Jan 2020 16:04:01 -0800 From: Pallavi Kadam To: dev@dpdk.org, thomas@monjalon.net Cc: Harini.Ramakrishnan@microsoft.com, keith.wiles@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com, jerinjacobk@gmail.com, ranjit.menon@intel.com, antara.ganesh.kolar@intel.com, pallavi.kadam@intel.com Date: Thu, 30 Jan 2020 16:03:05 -0800 Message-Id: <20200131000307.10608-9-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20200131000307.10608-1-pallavi.kadam@intel.com> References: <20200113215534.10084-1-pallavi.kadam@intel.com> <20200131000307.10608-1-pallavi.kadam@intel.com> Subject: [dpdk-dev] [PATCH v6 08/10] eal: remove syslog and dlfcn support for 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" Excluding syslog/ dlfcn definitions and parameters from Windows by adding #ifndef RTE_EXEC_ENV_WINDOWS. Note: This is a temporary change. In future, separate 'unix' directory will be created for unix specific functions. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon --- lib/librte_eal/common/eal_common_options.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 5920233bc..fc98e6666 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -6,12 +6,16 @@ #include #include #include +#ifndef RTE_EXEC_ENV_WINDOWS #include +#endif #include #include #include #include +#ifndef RTE_EXEC_ENV_WINDOWS #include +#endif #include #include #include @@ -205,7 +209,9 @@ eal_reset_internal_config(struct internal_config *internal_cfg) } internal_cfg->base_virtaddr = 0; +#ifdef LOG_DAEMON internal_cfg->syslog_facility = LOG_DAEMON; +#endif /* if set to NONE, interrupt mode is determined automatically */ internal_cfg->vfio_intr_mode = RTE_INTR_MODE_NONE; @@ -278,6 +284,7 @@ eal_plugindir_init(const char *path) int eal_plugins_init(void) { +#ifndef RTE_EXEC_ENV_WINDOWS struct shared_driver *solib = NULL; struct stat sb; @@ -306,6 +313,7 @@ eal_plugins_init(void) } return 0; +#endif } /* @@ -927,6 +935,7 @@ eal_parse_lcores(const char *lcores) return ret; } +#ifndef RTE_EXEC_ENV_WINDOWS static int eal_parse_syslog(const char *facility, struct internal_config *conf) { @@ -965,6 +974,7 @@ eal_parse_syslog(const char *facility, struct internal_config *conf) } return -1; } +#endif static int eal_parse_log_priority(const char *level) @@ -1389,6 +1399,7 @@ eal_parse_common_option(int opt, const char *optarg, } break; +#ifndef RTE_EXEC_ENV_WINDOWS case OPT_SYSLOG_NUM: if (eal_parse_syslog(optarg, conf) < 0) { RTE_LOG(ERR, EAL, "invalid parameters for --" @@ -1396,6 +1407,7 @@ eal_parse_common_option(int opt, const char *optarg, return -1; } break; +#endif case OPT_LOG_LEVEL_NUM: { if (eal_parse_log_level(optarg) < 0) {