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 2D05DA0487
	for <public@inbox.dpdk.org>; Thu,  4 Jul 2019 21:51:19 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id F2A622BE5;
	Thu,  4 Jul 2019 21:51:17 +0200 (CEST)
Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com
 [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 023812BE3
 for <dev@dpdk.org>; Thu,  4 Jul 2019 21:51:15 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailnew.nyi.internal (Postfix) with ESMTP id 3DEFF1582;
 Thu,  4 Jul 2019 15:51:12 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Thu, 04 Jul 2019 15:51:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=mesmtp;
 bh=81C/oT+czzoMLgW62wXApQw/SCkw6XNmtHzErG822cQ=; b=rD/sQdrE5aWY
 rGaHJ+vJuQtT4QJpQXPCaxmTS6rUmfssjXaRSPHIvkSw4KCL2azS9KRXDd4edT0K
 OUd4n+AP5p70gQgPpS6cX4EUQykEfDtDVUaCp+QS0cC0BYzEuCi2kvF1qbp1M5Tv
 1D9GLyi0lK+9vdpIDN7DCeIvS2AsZB4=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; bh=81C/oT+czzoMLgW62wXApQw/SCkw6XNmtHzErG822
 cQ=; b=VV1yny5Fy6JrM5VuhwV4Mof34Z3DJJkjygfOc0tdxzobAwx/nytBPKuFY
 KMq/NPrfQ5O48aT/77cO8lpbrD/W+nvZLNSK+zjNDtObYyIHmilymi8toyhhqQ3m
 FAc7EXz/0gTXTtR/N8ncX3Vr5UY0pZ8IYelZK84KYtsya17dBTymZWw46r2U9qHO
 mr5HdUr9zQ6pfrkjh+K04OZkV3nJKqiQDVv0f6xtFlGnLw8BuEmKgzsfgFu+VgvG
 /V76tSmxZVNdS8snDQ/f9U4VLXVWgYDRDk3kvZkAws9akd4lp8EJLrK5y0DLH0rC
 Q9+KpE1Wk4BqxBd9wmGfcv2B0XKGA==
X-ME-Sender: <xms:rlgeXdLyEShf2uF6jPvTuFUlJsxX83H7R6Rh6LJtgF6vqEd0JceFXQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrfedvgddugeehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf
 hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh
 ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:rlgeXdYEisZ5BVIm-B7XJNpDOKqfLlGpZTtljWOQSkxG0-V-jXrusQ>
 <xmx:rlgeXQtAD1TrUpG_Fa-_5r5vgaiQQzU4-IcWGpAhibNmbWR7UhyqRg>
 <xmx:rlgeXSswKyGLWi6oLUm9XCT6jDGgEbdg-GTXaCxHnClryLeVTMIDpw>
 <xmx:sFgeXcSjmJCbqyHsLfr2ITUyGMyuYbra0Ka-EEi9dR6rfyuodh377w>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 7496580063;
 Thu,  4 Jul 2019 15:51:08 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, Neil Horman <nhorman@tuxdriver.com>,
 John McNamara <john.mcnamara@intel.com>,
 Marko Kovacevic <marko.kovacevic@intel.com>,
 Konstantin Ananyev <konstantin.ananyev@intel.com>,
 David Hunt <david.hunt@intel.com>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Byron Marohn <byron.marohn@intel.com>,
 Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>,
 Yipeng Wang <yipeng1.wang@intel.com>, Sameh Gobriel <sameh.gobriel@intel.com>,
 Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
 Olivier Matz <olivier.matz@6wind.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>,
 Reshma Pattan <reshma.pattan@intel.com>, david.marchand@redhat.com,
 stephen@networkplumber.org
Date: Thu, 04 Jul 2019 21:51:06 +0200
Message-ID: <1598886.Pakv32BBGA@xps>
In-Reply-To: <0e63b2e2abe185b711737a7102f6d6cd03101cab.1561635481.git.anatoly.burakov@intel.com>
References: <cover.1561635481.git.anatoly.burakov@intel.com>
 <0e63b2e2abe185b711737a7102f6d6cd03101cab.1561635481.git.anatoly.burakov@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v3 09/14] eal: hide shared memory config
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>

27/06/2019 13:39, Anatoly Burakov:
> +/**
> + * the structure for the memory configuration for the RTE.
> + * Used by the rte_config structure. It is separated out, as for multi-process
> + * support, the memory details should be shared across instances
> + */
> +struct rte_mem_config {
> +	volatile uint32_t magic;   /**< Magic number - Sanity check. */
> +
> +	/* memory topology */
> +	uint32_t nchannel;    /**< Number of channels (0 if unknown). */
> +	uint32_t nrank;       /**< Number of ranks (0 if unknown). */
> +
> +	/**
> +	 * current lock nest order
> +	 *  - qlock->mlock (ring/hash/lpm)
> +	 *  - mplock->qlock->mlock (mempool)
> +	 * Notice:
> +	 *  *ALWAYS* obtain qlock first if having to obtain both qlock and mlock
> +	 */
> +	rte_rwlock_t mlock;   /**< only used by memzone LIB for thread-safe. */
> +	rte_rwlock_t qlock;   /**< used for tailq operation for thread safe. */
> +	rte_rwlock_t mplock;  /**< only used by mempool LIB for thread-safe. */
> +
> +	rte_rwlock_t memory_hotplug_lock;
> +	/**< indicates whether memory hotplug request is in progress. */
> +
> +	/* memory segments and zones */
> +	struct rte_fbarray memzones; /**< Memzone descriptors. */
> +
> +	struct rte_memseg_list memsegs[RTE_MAX_MEMSEG_LISTS];
> +	/**< list of dynamic arrays holding memsegs */
> +
> +	struct rte_tailq_head tailq_head[RTE_MAX_TAILQ];
> +	/**< Tailqs for objects */
> +
> +	/* Heaps of Malloc */
> +	struct malloc_heap malloc_heaps[RTE_MAX_HEAPS];
> +
> +	/* next socket ID for external malloc heap */
> +	int next_socket_id;
> +
> +	/* address of mem_config in primary process. used to map shared config
> +	 * into exact same address the primary process maps it.
> +	 */
> +	uint64_t mem_cfg_addr;
> +
> +	/* legacy mem and single file segments options are shared */
> +	uint32_t legacy_mem;
> +	uint32_t single_file_segments;
> +
> +	/* keeps the more restricted dma mask */
> +	uint8_t dma_maskbits;
> +} __attribute__((packed));

While moving it, you could take the opportunity to do some
small cleanups of the comments, like removing "for the RTE",
or adding some uppercases and dots, etc.