From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6E674B108 for ; Tue, 3 Jun 2014 15:00:16 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 03 Jun 2014 06:00:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,965,1392192000"; d="scan'208";a="549029846" Received: from shilc102.sh.intel.com ([10.239.39.44]) by fmsmga002.fm.intel.com with ESMTP; 03 Jun 2014 06:00:24 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shilc102.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s53D0K5T020394; Tue, 3 Jun 2014 21:00:22 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s53D0HmJ006982; Tue, 3 Jun 2014 21:00:19 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s53D0HSs006978; Tue, 3 Jun 2014 21:00:17 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Tue, 3 Jun 2014 21:00:15 +0800 Message-Id: <1401800415-6840-1-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH]xen:fix an issue about memory size caculation in Dom0 driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 13:00:17 -0000 The unit of allocated_size is MB,so the change below is made. Otherwise, it will fail to free memory when available memory is not enough. Signed-off-by: Jijiang Liu Acked-by: Huawei Xie Tested-by: Heng Ding --- lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c index a91c7ec..0f87905 100644 --- a/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c +++ b/lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c @@ -447,7 +447,7 @@ dom0_memory_reserve(uint32_t rsv_size) return -ENOMEM; } - allocated_size += DOM0_MEMBLOCK_SIZE; + allocated_size += SIZE_PER_BLOCK; size = DOM0_MEMBLOCK_SIZE; vaddr = vstart; -- 1.7.7.6