From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4F3B22C49 for ; Tue, 14 Mar 2017 12:53:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489492439; x=1521028439; h=from:to:cc:subject:references:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=x+BLp6IzwpOg6ZOa1yT3js684elYWwFJ/bf+BUJnouc=; b=K8o4ZLJW3vwZLOYklL6aL6gefn1Oyd4foc0VFISIMoHwjDF7ot0MAK+F FynhuHLs7YNc9q9Hz/oardC5RDc3rA==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2017 04:53:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,163,1486454400"; d="scan'208";a="235897424" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.221.13]) ([10.237.221.13]) by fmsmga004.fm.intel.com with ESMTP; 14 Mar 2017 04:53:55 -0700 From: Sergio Gonzalez Monroy To: Yerden Zhumabekov Cc: "dev@dpdk.org" , David Marchand References: <35999a70-0d8c-61a7-37bd-2e4f224867e3@sts.kz> Message-ID: <45d72fc4-d529-19e4-c49d-75761956b9b6@intel.com> Date: Tue, 14 Mar 2017 11:53:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <35999a70-0d8c-61a7-37bd-2e4f224867e3@sts.kz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] rte_malloc_heap usage scenario 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: , X-List-Received-Date: Tue, 14 Mar 2017 11:53:59 -0000 On 09/03/2017 04:48, Yerden Zhumabekov wrote: > Hello, > > Can anybody explain why rte_malloc_heap.h is advertised as a public > interface? It only contains malloc_heap struct which is used > internally and violates DPDK naming conventions for public struct. I > haven't found any use of it outside of EAL and it's undocumented. If > it is in fact public, will it continue to be? As you point out, the struct name does not follow dpdk conventions for public structs, that is how it was historically and was never changed. IMHO the struct itself is not meant to be public (probably we should add some comments) but it needs to be as it is a field in public 'struct rte_mem_config' which is also a field in public 'struct rte_config'. That being said, it doesn't look like rte_mem_config should be a public struct at all, although there are a couple of PMDs (virtio_user and ena) accessing mem_config info through rte_config. I cannot guarantee that would remain public, but there should be at least a notice in case of any changes. Sergio > > I'd like to use it (and some code in librte_eal/common) for > region-based allocation in a secondary process for easy memory > reclamation in case of failure. Is it safe to reuse malloc_heap struct? > >