From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 58D18A32A4
	for <public@inbox.dpdk.org>; Fri, 25 Oct 2019 15:59:03 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id EE7EB1D146;
	Fri, 25 Oct 2019 15:57:23 +0200 (CEST)
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com
 [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 2F11B1C2AD
 for <dev@dpdk.org>; Fri, 25 Oct 2019 15:57:12 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1572011831;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=rvRFWvtd/pBiXuyKA3V/dzf1yFu8WguKvWgxLvV5lqk=;
 b=bggq9qXfBc4hXWYOvWTc71Q072pbW5I4a8fQN+Sym1yltZB662GjdEzHQ+VYHLmibSRMqW
 RvVm50t9zNxnm/Nt8/aq/ONcp3p8+l74ACduiFITHnLE2jaWBybtL30x0ZM9R5Cedslunu
 3q8vLTffxRXWJVIIh3vOOfQSxi7Y+5Q=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-192--6kCtUNgMFKRuXP5AIo_tQ-1; Fri, 25 Oct 2019 09:57:08 -0400
Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com
 [10.5.11.22])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FD311005500;
 Fri, 25 Oct 2019 13:57:07 +0000 (UTC)
Received: from dmarchan.remote.csb (ovpn-204-129.brq.redhat.com
 [10.40.204.129])
 by smtp.corp.redhat.com (Postfix) with ESMTP id DC75E1001B33;
 Fri, 25 Oct 2019 13:57:04 +0000 (UTC)
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>
Date: Fri, 25 Oct 2019 15:56:10 +0200
Message-Id: <1572011772-23271-12-git-send-email-david.marchand@redhat.com>
In-Reply-To: <1572011772-23271-1-git-send-email-david.marchand@redhat.com>
References: <1571736761-32134-1-git-send-email-david.marchand@redhat.com>
 <1572011772-23271-1-git-send-email-david.marchand@redhat.com>
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
X-MC-Unique: -6kCtUNgMFKRuXP5AIo_tQ-1
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Subject: [dpdk-dev] [PATCH v3 11/12] eal: make the global configuration
	private
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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.
=20
+* eal: made the ``rte_config`` struct and ``rte_eal_get_configuration``
+  function private.
+
 * pci: removed the following deprecated functions since dpdk:
=20
   - ``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/commo=
n/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 @@
=20
 #include "eal_internal_cfg.h"
 #include "eal_memcfg.h"
+#include "eal_private.h"
=20
 void
 eal_mcfg_complete(void)
diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/ea=
l_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];
=20
 /**
+ * The global RTE configuration structure.
+ */
+struct rte_config {
+=09uint32_t master_lcore;       /**< Id of the master lcore */
+=09uint32_t lcore_count;        /**< Number of available logical cores. */
+=09uint32_t numa_node_count;    /**< Number of detected NUMA nodes. */
+=09uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nod=
es. */
+=09uint32_t service_lcore_count;/**< Number of available service cores. */
+=09enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]; /**< State of cores. *=
/
+
+=09/** Primary or secondary configuration */
+=09enum rte_proc_type_t process_type;
+
+=09/** PA or VA mapping mode */
+=09enum rte_iova_mode iova_mode;
+
+=09/**
+=09 * Pointer to memory configuration, which may be shared across multiple
+=09 * DPDK instances
+=09 */
+=09struct 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/commo=
n/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 {
 };
=20
 /**
- * The global RTE configuration structure.
- */
-struct rte_config {
-=09uint32_t master_lcore;       /**< Id of the master lcore */
-=09uint32_t lcore_count;        /**< Number of available logical cores. */
-=09uint32_t numa_node_count;    /**< Number of detected NUMA nodes. */
-=09uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nod=
es. */
-=09uint32_t service_lcore_count;/**< Number of available service cores. */
-=09enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]; /**< State of cores. *=
/
-
-=09/** Primary or secondary configuration */
-=09enum rte_proc_type_t process_type;
-
-=09/** PA or VA mapping mode */
-=09enum rte_iova_mode iova_mode;
-
-=09/**
-=09 * Pointer to memory configuration, which may be shared across multiple
-=09 * DPDK instances
-=09 */
-=09struct 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/ma=
lloc_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"
=20
=20
 /* Free the memory space back to heap */
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_ve=
rsion.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 {
 =09rte_dump_tailq;
 =09rte_eal_alarm_cancel;
 =09rte_eal_alarm_set;
-=09rte_eal_get_configuration;
 =09rte_eal_get_lcore_state;
 =09rte_eal_get_physmem_size;
 =09rte_eal_has_hugepages;
--=20
1.8.3.1