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 2D05DA0487 for ; 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 ; 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: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrfedvgddugeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: 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 To: Anatoly Burakov Cc: dev@dpdk.org, Neil Horman , John McNamara , Marko Kovacevic , Konstantin Ananyev , David Hunt , Bruce Richardson , Byron Marohn , Pablo de Lara Guarch , Yipeng Wang , Sameh Gobriel , Vladimir Medvedkin , Olivier Matz , Andrew Rybchenko , Reshma Pattan , 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: <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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.