From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 508BBA0A02; Fri, 26 Mar 2021 13:35:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4F3B40685; Fri, 26 Mar 2021 13:35:08 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 0E73F4067B for ; Fri, 26 Mar 2021 13:35:06 +0100 (CET) IronPort-SDR: RNwFGEae0qvMylOVHtjx6Xj4nhhxjJJbd+Yz20EIfw9tV+CwlvkqgY01zDl82HdOocM1OWlSJk BUWASEvwt07Q== X-IronPort-AV: E=McAfee;i="6000,8403,9934"; a="255132406" X-IronPort-AV: E=Sophos;i="5.81,280,1610438400"; d="scan'208";a="255132406" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 05:35:02 -0700 IronPort-SDR: mOrNxz3htcZB40MbP3AZ9lZZhX0+lMdtvj0+61H0MqIcaNMHJzJTsYalg7ghC56uIXOnnyIw12 9w1el2u4fuXA== X-IronPort-AV: E=Sophos;i="5.81,280,1610438400"; d="scan'208";a="409881564" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.15.173]) ([10.252.15.173]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 05:35:01 -0700 To: Dmitry Kozlyuk , dev@dpdk.org Cc: Jie Zhou , David Marchand References: <20210324180128.32752-1-dmitry.kozliuk@gmail.com> <20210324193227.15497-1-dmitry.kozliuk@gmail.com> From: "Burakov, Anatoly" Message-ID: <9ebda66e-a101-3c57-1b5f-ef87e5e4db6e@intel.com> Date: Fri, 26 Mar 2021 12:34:57 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210324193227.15497-1-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 v2] mem: fix cleanup when multi-process is disabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 24-Mar-21 7:32 PM, Dmitry Kozlyuk wrote: > rte_eal_memory_detach() did not account for cases where multi-process > mode is disabled: --in-memory and --no-shconf. This resulted > in unmapping memory that had not been mapped, which caused errors: > > EAL: Could not unmap memory: No error (Windows) > EAL: Cannot munmap(0x1d47f40, 0x7000): Invalid argument (Linux) > > Confusing "No error" was caused by using errno instead of rte_errno > set by rte_mem_unmap(). > > Skip detaching memory altogether when --in-memory is specified. > Skip unmapping configuration when it's not shared. > Fix and add error handling to produce proper log messages. > > Fixes: dfbc61a2f9a6 ("mem: detach memsegs on cleanup") > Cc: Anatoly Burakov > > Reported-by: Jie Zhou > Suggested-by: David Marchand > Signed-off-by: Dmitry Kozlyuk > --- LGTM Acked-by: Anatoly Burakov -- Thanks, Anatoly