From: David Marchand Date: Fri, 18 Apr 2014 12:58:08 +0000 (+0200) Subject: eal: remove unused config fields X-Git-Tag: spdx-start~10857 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=69020660c382b1feff2a0b6c56f8decf2f79e953 eal: remove unused config fields There is no need for a 'magic' field in struct rte_config, as this part of the structure is local to each process. All threads of a process are synchronised because of the run_once atomic. So remove this field, as it is only adding confusion when reading code that references 'magic' field from struct rte_mem_config. Besides, there is no reference about the 'version' field, so remove it as well. Signed-off-by: David Marchand Acked-by: Neil Horman --- diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 93bd50b230..5fe293668c 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -280,8 +280,6 @@ eal_proc_type_detect(void) static void rte_config_init(void) { - /* set the magic in configuration structure */ - rte_config.magic = RTE_MAGIC; rte_config.process_type = (internal_config.process_type == RTE_PROC_AUTO) ? eal_proc_type_detect() : /* for auto, detect the type */ internal_config.process_type; /* otherwise use what's already set */ diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 658b4f7a56..8fac05eb75 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -71,10 +71,6 @@ enum rte_proc_type_t { * The global RTE configuration structure. */ struct rte_config { - uint32_t version; /**< Configuration [structure] version. */ - uint32_t magic; /**< Magic number - Sanity check. */ - - uint32_t master_lcore; /**< Id of the master lcore */ uint32_t lcore_count; /**< Number of available logical cores. */ enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]; /**< State of cores. */ diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 39951fcc20..d7a59def56 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -289,8 +289,6 @@ eal_proc_type_detect(void) static void rte_config_init(void) { - /* set the magic in configuration structure */ - rte_config.magic = RTE_MAGIC; rte_config.process_type = (internal_config.process_type == RTE_PROC_AUTO) ? eal_proc_type_detect() : /* for auto, detect the type */ internal_config.process_type; /* otherwise use what's already set */