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 CE678A0093;
	Mon, 15 Jun 2020 12:54:03 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 48BD74C7A;
	Mon, 15 Jun 2020 12:54:03 +0200 (CEST)
Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])
 by dpdk.org (Postfix) with ESMTP id 680E3100C
 for <dev@dpdk.org>; Mon, 15 Jun 2020 12:54:02 +0200 (CEST)
Received: from 2606-a000-111b-4634-0000-0000-0000-1bf2.inf6.spectrum.com
 ([2606:a000:111b:4634::1bf2] helo=localhost)
 by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63)
 (envelope-from <nhorman@tuxdriver.com>)
 id 1jkmkL-00061G-WE; Mon, 15 Jun 2020 06:53:53 -0400
Date: Mon, 15 Jun 2020 06:53:45 -0400
From: Neil Horman <nhorman@tuxdriver.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: "Kinsella, Ray" <mdr@ashroe.eu>, dev@dpdk.org,
 Dmitry Malloy <dmitrym@microsoft.com>,
 Narcisa Ana Maria Vasile <Narcisa.Vasile@microsoft.com>,
 Fady Bader <fady@mellanox.com>, Tal Shnaiderman <talshn@mellanox.com>,
 Anatoly Burakov <anatoly.burakov@intel.com>,
 Bruce Richardson <bruce.richardson@intel.com>
Message-ID: <20200615105345.GA281125@hmswarspite.think-freely.org>
References: <20200610142730.31376-1-dmitry.kozliuk@gmail.com>
 <20200615004354.14380-1-dmitry.kozliuk@gmail.com>
 <20200615004354.14380-4-dmitry.kozliuk@gmail.com>
 <ffff0f6d-d074-1bde-0d8e-28a0e55eb974@ashroe.eu>
 <20200615104120.15de8e8e@sovereign>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200615104120.15de8e8e@sovereign>
X-Spam-Score: -2.9 (--)
X-Spam-Status: No
Subject: Re: [dpdk-dev] [PATCH v9 03/12] eal: introduce memory management
	wrappers
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>

On Mon, Jun 15, 2020 at 10:41:20AM +0300, Dmitry Kozlyuk wrote:
> On Mon, 15 Jun 2020 07:03:23 +0100
> "Kinsella, Ray" <mdr@ashroe.eu> wrote:
> 
> [snip]
> > > +
> > > +INTERNAL {
> > > +	global:
> > > +
> > > +	rte_mem_lock;
> > > +	rte_mem_map;
> > > +	rte_mem_page_size;
> > > +	rte_mem_unmap;
> > > +};  
> > 
> > Don't
> > 
> > * eal_mem_reserve()
> > * eal_mem_free()
> > * eal_mem_set_dump()
> > 
> > Belong in the map file also?
> 
> No need to export these funtions, they're only used by librte_eal.
> 
But theres lots of locations in dpdk that could be using these functions.  I
count 57 calls sites in dpdk for sysconf(SC_PAGESIZE), spread throughout the
library collection, as well as some others for sysconf(_SC_IOV_MAX) and
sysconf(_SC_NPROCESSORS_CONF).  If the goal is to abstract away the use of
sysconf in dpdk, you probably at least want to export rte_mem_page_size.

the same is likely true for mmap/munmap

Neil

> -- 
> Dmitry Kozlyuk
>