DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: David Marchand <david.marchand@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] eal: remove unused fields
Date: Fri, 18 Apr 2014 09:23:23 -0400	[thread overview]
Message-ID: <20140418132323.GF4053@localhost.localdomain> (raw)
In-Reply-To: <1397825888-24399-1-git-send-email-david.marchand@6wind.com>

On Fri, Apr 18, 2014 at 02:58:08PM +0200, David Marchand wrote:
> 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 <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> ---
>  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
> 
> 

  reply	other threads:[~2014-04-18 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18 12:58 David Marchand
2014-04-18 13:23 ` Neil Horman [this message]
2014-05-05 16:05   ` Thomas Monjalon

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=20140418132323.GF4053@localhost.localdomain \
    --to=nhorman@tuxdriver.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    /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).