From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE00BA329E for ; Wed, 23 Oct 2019 20:56:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A597C1D449; Wed, 23 Oct 2019 20:55:25 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id C36DB1D175 for ; Wed, 23 Oct 2019 20:55:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571856919; 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=U5qRUXLnr7YKIqFD9daArkiOvIIlYjHdxZMzTWRLF5I=; b=X82AOnCc1dV3T5cIzfqMnqyNo9iDlSk63DerpsKv15LA4YiT3exGk0EEWtCuMEfSv1djq2 5sAsOg7e04T3eCFMpT1r4q4lK5+Lu8/R0BS4bKXqauxtLO/cEZDUZ5xsR8rYebe9qNuzTo C503HaOCq1DlqZPpIp8wXGRfgikZuTM= 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-68-Omo89_nkPlSOTChiraBllQ-1; Wed, 23 Oct 2019 14:55:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B096080183E; Wed, 23 Oct 2019 18:55:14 +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 A11B860872; Wed, 23 Oct 2019 18:55:12 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stephen@networkplumber.org, anatoly.burakov@intel.com, thomas@monjalon.net, John McNamara , Marko Kovacevic Date: Wed, 23 Oct 2019 20:54:24 +0200 Message-Id: <1571856864-8779-13-git-send-email-david.marchand@redhat.com> In-Reply-To: <1571856864-8779-1-git-send-email-david.marchand@redhat.com> References: <1571736761-32134-1-git-send-email-david.marchand@redhat.com> <1571856864-8779-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: Omo89_nkPlSOTChiraBllQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH v2 12/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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Now that all elements of the rte_config structure have (deinlined) accessors, we can hide it. Signed-off-by: David Marchand --- 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 082c570..ae0f21e 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -212,6 +212,9 @@ ABI Changes =20 * eal: made the ``rte_logs`` struct and global symbol private. =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 e7422d4..009641f 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