DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org, anatoly.burakov@intel.com,
	thomas@monjalon.net, ktraynor@redhat.com,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>
Subject: [dpdk-dev] [PATCH v3 11/12] eal: make the global configuration private
Date: Fri, 25 Oct 2019 15:56:10 +0200	[thread overview]
Message-ID: <1572011772-23271-12-git-send-email-david.marchand@redhat.com> (raw)
In-Reply-To: <1572011772-23271-1-git-send-email-david.marchand@redhat.com>

Now that all elements of the rte_config structure have (deinlined)
accessors, we can hide it.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/release_19_11.rst  |  3 +++
 lib/librte_eal/common/eal_common_mcfg.c |  1 +
 lib/librte_eal/common/eal_private.h     | 32 ++++++++++++++++++++++++++++++++
 lib/librte_eal/common/include/rte_eal.h | 32 --------------------------------
 lib/librte_eal/common/malloc_heap.c     |  1 +
 lib/librte_eal/common/rte_malloc.c      |  1 +
 lib/librte_eal/rte_eal_version.map      |  1 -
 7 files changed, 38 insertions(+), 33 deletions(-)

diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 8d88257..393fb61 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -320,6 +320,9 @@ ABI Changes
 * eal: removed the ``rte_malloc_virt2phy`` function, replaced by
   ``rte_malloc_virt2iova`` since v17.11.
 
+* eal: made the ``rte_config`` struct and ``rte_eal_get_configuration``
+  function private.
+
 * pci: removed the following deprecated functions since dpdk:
 
   - ``eal_parse_pci_BDF`` replaced by ``rte_pci_addr_parse``
diff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/common/eal_common_mcfg.c
index 0665494..0cf9a62 100644
--- a/lib/librte_eal/common/eal_common_mcfg.c
+++ b/lib/librte_eal/common/eal_common_mcfg.c
@@ -8,6 +8,7 @@
 
 #include "eal_internal_cfg.h"
 #include "eal_memcfg.h"
+#include "eal_private.h"
 
 void
 eal_mcfg_complete(void)
diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h
index 0e4b033..52eea9a 100644
--- a/lib/librte_eal/common/eal_private.h
+++ b/lib/librte_eal/common/eal_private.h
@@ -37,6 +37,38 @@ struct lcore_config {
 extern struct lcore_config lcore_config[RTE_MAX_LCORE];
 
 /**
+ * The global RTE configuration structure.
+ */
+struct rte_config {
+	uint32_t master_lcore;       /**< Id of the master lcore */
+	uint32_t lcore_count;        /**< Number of available logical cores. */
+	uint32_t numa_node_count;    /**< Number of detected NUMA nodes. */
+	uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nodes. */
+	uint32_t service_lcore_count;/**< Number of available service cores. */
+	enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]; /**< State of cores. */
+
+	/** Primary or secondary configuration */
+	enum rte_proc_type_t process_type;
+
+	/** PA or VA mapping mode */
+	enum rte_iova_mode iova_mode;
+
+	/**
+	 * Pointer to memory configuration, which may be shared across multiple
+	 * DPDK instances
+	 */
+	struct rte_mem_config *mem_config;
+} __attribute__((__packed__));
+
+/**
+ * Get the global configuration structure.
+ *
+ * @return
+ *   A pointer to the global configuration structure.
+ */
+struct rte_config *rte_eal_get_configuration(void);
+
+/**
  * Initialize the memzone subsystem (private to eal).
  *
  * @return
diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index ea3c9df..2f9ed29 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -52,38 +52,6 @@ enum rte_proc_type_t {
 };
 
 /**
- * The global RTE configuration structure.
- */
-struct rte_config {
-	uint32_t master_lcore;       /**< Id of the master lcore */
-	uint32_t lcore_count;        /**< Number of available logical cores. */
-	uint32_t numa_node_count;    /**< Number of detected NUMA nodes. */
-	uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nodes. */
-	uint32_t service_lcore_count;/**< Number of available service cores. */
-	enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]; /**< State of cores. */
-
-	/** Primary or secondary configuration */
-	enum rte_proc_type_t process_type;
-
-	/** PA or VA mapping mode */
-	enum rte_iova_mode iova_mode;
-
-	/**
-	 * Pointer to memory configuration, which may be shared across multiple
-	 * DPDK instances
-	 */
-	struct rte_mem_config *mem_config;
-} __attribute__((__packed__));
-
-/**
- * Get the global configuration structure.
- *
- * @return
- *   A pointer to the global configuration structure.
- */
-struct rte_config *rte_eal_get_configuration(void);
-
-/**
  * Get the process type in a multi-process setup
  *
  * @return
diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index 634ca21..842eb9d 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -27,6 +27,7 @@
 #include "eal_internal_cfg.h"
 #include "eal_memalloc.h"
 #include "eal_memcfg.h"
+#include "eal_private.h"
 #include "malloc_elem.h"
 #include "malloc_heap.h"
 #include "malloc_mp.h"
diff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c
index fecd9a9..044d3a9 100644
--- a/lib/librte_eal/common/rte_malloc.c
+++ b/lib/librte_eal/common/rte_malloc.c
@@ -26,6 +26,7 @@
 #include "malloc_heap.h"
 #include "eal_memalloc.h"
 #include "eal_memcfg.h"
+#include "eal_private.h"
 
 
 /* Free the memory space back to heap */
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index d88649e..3478d3b 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -17,7 +17,6 @@ DPDK_2.0 {
 	rte_dump_tailq;
 	rte_eal_alarm_cancel;
 	rte_eal_alarm_set;
-	rte_eal_get_configuration;
 	rte_eal_get_lcore_state;
 	rte_eal_get_physmem_size;
 	rte_eal_has_hugepages;
-- 
1.8.3.1


  parent reply	other threads:[~2019-10-25 13:59 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  9:32 [dpdk-dev] [PATCH 0/8] EAL and PCI ABI changes for 19.11 David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 1/8] eal: make lcore config private David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 2/8] eal: remove deprecated CPU flags check function David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 3/8] eal: remove deprecated malloc virt2phys function David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 4/8] mem: hide internal heap header David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 5/8] net/bonding: use non deprecated PCI API David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 6/8] pci: remove deprecated functions David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 7/8] log: add log stream accessor David Marchand
2019-10-22 16:34   ` Stephen Hemminger
2019-10-22 16:50     ` David Marchand
2019-10-22  9:32 ` [dpdk-dev] [PATCH 8/8] log: hide internal log structure David Marchand
2019-10-22 16:35   ` Stephen Hemminger
2019-10-23 13:02   ` David Marchand
2019-10-23 18:54 ` [dpdk-dev] [PATCH v2 00/12] EAL and PCI ABI changes for 19.11 David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 01/12] eal: make lcore config private David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 02/12] eal: remove deprecated CPU flags check function David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 03/12] eal: remove deprecated malloc virt2phys function David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 04/12] mem: hide internal heap header David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 05/12] net/bonding: use non deprecated PCI API David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 06/12] pci: remove deprecated functions David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 07/12] log: add log stream accessor David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 08/12] log: hide internal log structure David Marchand
2019-10-24 16:30     ` Thomas Monjalon
2019-10-25  9:19       ` Kevin Traynor
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 09/12] test/mem: remove dependency on EAL internals David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 10/12] eal: deinline lcore APIs David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 11/12] eal: factorize lcore role code in common code David Marchand
2019-10-23 18:54   ` [dpdk-dev] [PATCH v2 12/12] eal: make the global configuration private David Marchand
2019-10-23 21:10   ` [dpdk-dev] [PATCH v2 00/12] EAL and PCI ABI changes for 19.11 Stephen Hemminger
2019-10-24  7:32     ` David Marchand
2019-10-24 15:37       ` Stephen Hemminger
2019-10-24 16:01         ` David Marchand
2019-10-24 16:37   ` Thomas Monjalon
2019-10-25 13:55 ` [dpdk-dev] [PATCH v3 " David Marchand
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 01/12] eal: make lcore config private David Marchand
2019-10-25 15:18     ` Burakov, Anatoly
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 02/12] eal: remove deprecated CPU flags check function David Marchand
2019-10-25 15:20     ` Burakov, Anatoly
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 03/12] eal: remove deprecated malloc virt2phys function David Marchand
2019-10-25 15:22     ` Burakov, Anatoly
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 04/12] mem: hide internal heap header David Marchand
2019-10-25 15:23     ` Burakov, Anatoly
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 05/12] net/bonding: use non deprecated PCI API David Marchand
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 06/12] pci: remove deprecated functions David Marchand
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 07/12] log: add log stream accessor David Marchand
2019-10-25 19:05     ` Kevin Traynor
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 08/12] test/mem: remove dependency on EAL internals David Marchand
2019-10-25 15:24     ` Burakov, Anatoly
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 09/12] eal: deinline lcore APIs David Marchand
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 10/12] eal: factorize lcore role code David Marchand
2019-10-25 13:56   ` David Marchand [this message]
2019-10-25 15:27     ` [dpdk-dev] [PATCH v3 11/12] eal: make the global configuration private Burakov, Anatoly
2019-10-25 13:56   ` [dpdk-dev] [PATCH v3 12/12] doc: announce global logs struct removal from ABI David Marchand
2019-10-25 15:30     ` Burakov, Anatoly
2019-10-25 15:33     ` Thomas Monjalon
2019-10-26 18:14     ` Kevin Traynor
2019-10-26 18:48       ` David Marchand
2019-10-26 19:18   ` [dpdk-dev] [PATCH v3 00/12] EAL and PCI ABI changes for 19.11 David Marchand
2019-10-27  6:26     ` David Marchand
2019-10-27  9:56       ` 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=1572011772-23271-12-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=ktraynor@redhat.com \
    --cc=marko.kovacevic@intel.com \
    --cc=stephen@networkplumber.org \
    --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).