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 333A4A00BE; Thu, 28 May 2020 13:52:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A4B361DB78; Thu, 28 May 2020 13:52:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 016281DB43 for ; Thu, 28 May 2020 13:52:55 +0200 (CEST) IronPort-SDR: 7tUawqTqLfV3GhnmRB8+lvuFM7GgYbrwDZ+2EaINz5OaM+681draPIsWHEhT4Zqpv5iejhNE5X vg2PV8FvgpyQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 04:52:55 -0700 IronPort-SDR: IJNqFp9R7vN7nNKF6NWgPTHRJugzxB9/3tsOgImb4A3rka0ozILE0HIwBcIhwrGAkBKO1zAKDj KO1dvd1M/Vfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,444,1583222400"; d="scan'208";a="376346540" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.45.206]) ([10.252.45.206]) by fmsmga001.fm.intel.com with ESMTP; 28 May 2020 04:52:51 -0700 To: Dmitry Kozlyuk , dev@dpdk.org Cc: Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Bruce Richardson , Ray Kinsella , Neil Horman References: <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-4-dmitry.kozliuk@gmail.com> From: "Burakov, Anatoly" Message-ID: <29127739-5c85-6c9c-e3d3-8182f0348045@intel.com> Date: Thu, 28 May 2020 12:52:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200525003720.6410-4-dmitry.kozliuk@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 03/11] 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 25-May-20 1:37 AM, Dmitry Kozlyuk wrote: > Introduce OS-independent wrappers for memory management operations used > across DPDK and specifically in common code of EAL: > > * rte_mem_map() > * rte_mem_unmap() > * rte_get_page_size() > * rte_mem_lock() > > Windows uses different APIs for memory mapping and reservation, while > Unices reserve memory by mapping it. Introduce EAL private functions to > support memory reservation in common code: > > * eal_mem_reserve() > * eal_mem_free() > * eal_mem_set_dump() > > Wrappers follow POSIX semantics limited to DPDK tasks, but their > signatures deliberately differ from POSIX ones to be more safe and > expressive. > > Signed-off-by: Dmitry Kozlyuk > --- > + } else if (mapped_addr == NULL) { > RTE_LOG(ERR, EAL, "Cannot get a virtual area: %s\n", > - strerror(errno)); > - /* pass errno up the call chain */ > - rte_errno = errno; > + strerror(rte_errno)); Also, please check that you're using rte_strerror with rte_errno :) -- Thanks, Anatoly