DPDK patches and discussions
 help / color / mirror / Atom feed
From: talshn@mellanox.com
To: dev@dpdk.org
Cc: thomas@monjalon.net, pallavi.kadam@intel.com,
	dmitry.kozliuk@gmail.com, david.marchand@redhat.com,
	olivier.matz@6wind.com, ranjit.menon@intel.com,
	navasile@linux.microsoft.com, fady@mellanox.com,
	harini.ramakrishnan@microsoft.com, ocardona@microsoft.com,
	Tal Shnaiderman <talshn@mellanox.com>
Subject: [dpdk-dev] [PATCH 1/4] eal: move OS common config code to single file
Date: Mon,  1 Jun 2020 12:38:15 +0300	[thread overview]
Message-ID: <20200601093818.5420-2-talshn@mellanox.com> (raw)
In-Reply-To: <20200601093818.5420-1-talshn@mellanox.com>

From: Tal Shnaiderman <talshn@mellanox.com>

Move common struct rte_config and function
rte_eal_mbuf_user_pool_ops to eal_config.

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 lib/librte_eal/common/eal_common_config.c | 11 +++++++++++
 lib/librte_eal/freebsd/eal.c              | 10 ----------
 lib/librte_eal/linux/eal.c                | 10 ----------
 lib/librte_eal/windows/eal.c              |  3 ---
 4 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_config.c b/lib/librte_eal/common/eal_common_config.c
index 641c7d884c..c69a088182 100644
--- a/lib/librte_eal/common/eal_common_config.c
+++ b/lib/librte_eal/common/eal_common_config.c
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2020 Mellanox Technologies, Ltd
  */
+#include <eal_internal_cfg.h>
 #include <eal_private.h>
 
 #include <rte_os.h>
@@ -13,6 +14,9 @@ struct rte_config rte_config = {
 		.mem_config = &early_mem_config,
 };
 
+/* internal configuration */
+struct internal_config internal_config;
+
 const char *
 rte_eal_get_runtime_dir(void)
 {
@@ -37,3 +41,10 @@ rte_eal_process_type(void)
 {
 	return rte_config.process_type;
 }
+
+/* Return user provided mbuf pool ops name */
+const char *
+rte_eal_mbuf_user_pool_ops(void)
+{
+	return internal_config.user_mbuf_pool_ops_name;
+}
diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index eab961232e..6be7414f1a 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -73,9 +73,6 @@ static struct flock wr_lock = {
 /* internal configuration (per-core) */
 struct lcore_config lcore_config[RTE_MAX_LCORE];
 
-/* internal configuration */
-struct internal_config internal_config;
-
 /* used by rte_rdtsc() */
 int rte_cycles_vmware_tsc_map;
 
@@ -141,13 +138,6 @@ eal_clean_runtime_dir(void)
 	return 0;
 }
 
-/* Return user provided mbuf pool ops name */
-const char *
-rte_eal_mbuf_user_pool_ops(void)
-{
-	return internal_config.user_mbuf_pool_ops_name;
-}
-
 /* parse a sysfs (or other) file containing one integer value */
 int
 eal_parse_sysfs_value(const char *filename, unsigned long *val)
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 8cbb8c644c..302f0a1228 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -86,9 +86,6 @@ static struct flock wr_lock = {
 /* internal configuration (per-core) */
 struct lcore_config lcore_config[RTE_MAX_LCORE];
 
-/* internal configuration */
-struct internal_config internal_config;
-
 /* used by rte_rdtsc() */
 int rte_cycles_vmware_tsc_map;
 
@@ -230,13 +227,6 @@ eal_clean_runtime_dir(void)
 	return -1;
 }
 
-/* Return user provided mbuf pool ops name */
-const char *
-rte_eal_mbuf_user_pool_ops(void)
-{
-	return internal_config.user_mbuf_pool_ops_name;
-}
-
 /* parse a sysfs (or other) file containing one integer value */
 int
 eal_parse_sysfs_value(const char *filename, unsigned long *val)
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 2a05f9e0da..daa238d416 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -35,9 +35,6 @@ static int mem_cfg_fd = -1;
 /* internal configuration (per-core) */
 struct lcore_config lcore_config[RTE_MAX_LCORE];
 
-/* internal configuration */
-struct internal_config internal_config;
-
 /* Detect if we are a primary or a secondary process */
 enum rte_proc_type_t
 eal_proc_type_detect(void)
-- 
2.16.1.windows.4


  reply	other threads:[~2020-06-01  9:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01  9:38 [dpdk-dev] [PATCH 0/4] Support librte_mbuf on Windows talshn
2020-06-01  9:38 ` talshn [this message]
2020-06-25 15:24   ` [dpdk-dev] [PATCH v2 0/3] " talshn
2020-06-25 15:24     ` [dpdk-dev] [PATCH v2 1/3] eal: correct OS headers in rte_byteorder.h talshn
2020-06-25 15:24     ` [dpdk-dev] [PATCH v2 2/3] eal: export needed functions for mbuf talshn
2020-06-25 15:24     ` [dpdk-dev] [PATCH v2 3/3] mbuf: build on Windows talshn
2020-07-07  0:01     ` [dpdk-dev] [PATCH v2 0/3] Support librte_mbuf " Thomas Monjalon
2020-06-01  9:38 ` [dpdk-dev] [PATCH 2/4] eal: set byteorder in Windows to little endian talshn
2020-06-16  7:50   ` Thomas Monjalon
2020-06-25 13:24     ` Tal Shnaiderman
2020-06-01  9:38 ` [dpdk-dev] [PATCH 3/4] eal: export needed functions for mbuf talshn
2020-06-16  8:09   ` Thomas Monjalon
2020-06-16  8:33     ` Tal Shnaiderman
2020-06-16  8:45       ` Thomas Monjalon
2020-06-16  9:26         ` Dmitry Kozlyuk
2020-06-16 11:44           ` Thomas Monjalon
2020-06-01  9:38 ` [dpdk-dev] [PATCH 4/4] mbuf: build on Windows talshn

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=20200601093818.5420-2-talshn@mellanox.com \
    --to=talshn@mellanox.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=fady@mellanox.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=olivier.matz@6wind.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --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).