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 3621AA0093; Mon, 15 Jun 2020 13:10:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 097D44C90; Mon, 15 Jun 2020 13:10:08 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 0D52D4C7A for ; Mon, 15 Jun 2020 13:10:06 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id e4so18674443ljn.4 for ; Mon, 15 Jun 2020 04:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fB+LRLEEecCsGpH1RCiUPXnLNiR/Ip5QhcD+y0Pkeq4=; b=XMZUqZzDSx6FDYySWOvfLvPuxaNvhUm5xFpbnk9n54Ya1rDLfOzqhLn00KQ6w16KWJ A6ElEXuHMPRngnUdO/4NEYfWcvFGin4BnD8Du62l13OctkIi4nJmOAF+HbsB8KfOm4aF TceTcrvD4z4InAaR43MYDK3B108J+++NvxW/jnVOmvvFmlRU75chUMIK5IfbdIQWlJwI 7CM5rfZ8xHutmjoVt9KdHY0YlDyE2Feuntvu9CgQqsZQNuMxA8VQtpZfUBZw8Yq/UaaY 1qfP8fXy4DmlpXnJepA9u0PCi3YOQ2KSlXMFnMhBvJgNU1Sj0R2jk1n+Cec80Q/JG+KN Is8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fB+LRLEEecCsGpH1RCiUPXnLNiR/Ip5QhcD+y0Pkeq4=; b=a2SeXZjRruFxOgW0qZlicxg5+9WZadQz7dbOyoBpTkp+jcC+bi15MFdj5kYK0f8Mne ybiq7fiNyflQF0vwZC7Y+AUDl7Z4da2+9xi7h8ZniGwhb9oAeQZ2TDRKZANfDiUKsVqa VmDl1aDB+nJG9foPGR1YbfsaX6qqigch8+rn3nzvPwbdllkf2a+6Zm9xMkPPaQTOE0/1 TD2iQu55iGovHknqc3IdTfSL+vyhQTrXZDhR9+KAt7f7sZ34gLQJ+xgAlLeg4HK65QaD UdVVwIj36X1ZuBvVWh71M3pNd98j1HSVyl+18kezT9XnNJvzsfiI+zY2NSX7hG65RIHm RHAA== X-Gm-Message-State: AOAM533XugBEZqNhRRQYZcuI82tpO3XrSVHQFouxqwFaiV0AWcd6X+gj zh470Anuet3BXvOU8HovZA8= X-Google-Smtp-Source: ABdhPJwjlPeUoLhsreQVDs7gAgggpUwRBySRxgYfjvlYuADp+im6HfQqoAXX6Q/u+EMGFDZ4+VUnOg== X-Received: by 2002:a2e:884a:: with SMTP id z10mr11923424ljj.208.1592219405536; Mon, 15 Jun 2020 04:10:05 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id w144sm4481865lff.67.2020.06.15.04.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 04:10:05 -0700 (PDT) Date: Mon, 15 Jun 2020 14:10:03 +0300 From: Dmitry Kozlyuk To: Neil Horman Cc: "Kinsella, Ray" , dev@dpdk.org, Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Anatoly Burakov , Bruce Richardson Message-ID: <20200615141003.736c3cb3@sovereign> In-Reply-To: <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> <20200615104120.15de8e8e@sovereign> <20200615105345.GA281125@hmswarspite.think-freely.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 15 Jun 2020 06:53:45 -0400 Neil Horman wrote: > On Mon, Jun 15, 2020 at 10:41:20AM +0300, Dmitry Kozlyuk wrote: > > On Mon, 15 Jun 2020 07:03:23 +0100 > > "Kinsella, Ray" 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 My comment (and Ray's one, I believe) was about eal_mem_*() functions. Those you're talking about, rte_mem_*(), are exported from EAL, but only visible to DPDK. Everything above is true, sysconf(), etc. can be replaced as the need arises to make the calling code OS-agnostic. -- Dmitry Kozlyuk