From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by dpdk.org (Postfix) with ESMTP id 13B8AAFCD for ; Fri, 18 Apr 2014 14:58:13 +0200 (CEST) Received: by mail-we0-f182.google.com with SMTP id p61so1571922wes.27 for ; Fri, 18 Apr 2014 05:58:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=sSqd7dEM6LSVXgz6FD/v/iUv0likwL4AE5nM5i9SbXc=; b=Vj/1OJAD0PQyyp7s7XQoAtC+FCoCckvW1UUwWWTiZzxcms1gneIcs4C9pDY1JIFGbX C/H85b6YcdpJsLx1RYV+dvO2JoUL+Au9ZFbhile67rORJzjN23lWihCkwojCpgoyXtb+ kVoki1uLqgLtP/1cpaBeSxMxLd0MvKWytDQqK1WuONf7COzcSJ7wLucfwHhZrJGVKiSc N+nE5g9G8yR1bj6a834Yxbgi38/DQ83JV8yoOK0vJw94LODmZci9W0aIzLCoF0DRhGgG Jxv6EC22DQpJVe3mInbyVngvXmUGo5oN11GIiNPxWm9E7a2SwiyxGj69DzN4iFsJgobT nL5A== X-Gm-Message-State: ALoCoQmAaD8wiZZfqzWdKuzyhtlsCxsnXxPm8bKXX9T7WHUch/ar2LYR1epJJIMRJ7BM7/OZAbZ2 X-Received: by 10.180.160.166 with SMTP id xl6mr2385717wib.42.1397825895033; Fri, 18 Apr 2014 05:58:15 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id r4sm43500219wjz.28.2014.04.18.05.58.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Apr 2014 05:58:14 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Fri, 18 Apr 2014 14:58:08 +0200 Message-Id: <1397825888-24399-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] eal: remove unused fields X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 12:58:14 -0000 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 --- lib/librte_eal/bsdapp/eal/eal.c | 2 -- lib/librte_eal/common/include/rte_eal.h | 4 ---- lib/librte_eal/linuxapp/eal/eal.c | 2 -- 3 files changed, 8 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index e944aba..8c81613 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -277,8 +277,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 658b4f7..8fac05e 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 04b2b32..b7f5ffa 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 */ -- 1.7.10.4