From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 324BA5A7A for ; Wed, 15 Jul 2015 12:12:03 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 15 Jul 2015 03:12:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,479,1432623600"; d="scan'208";a="764829577" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 15 Jul 2015 03:12:02 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t6FAC06J025820; Wed, 15 Jul 2015 11:12:00 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t6FAC0Fu005589; Wed, 15 Jul 2015 11:12:00 +0100 Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id t6FAC099005585; Wed, 15 Jul 2015 11:12:00 +0100 From: Sergio Gonzalez Monroy To: dev@dpdk.org Date: Wed, 15 Jul 2015 11:12:00 +0100 Message-Id: <1436955120-5548-1-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 1.8.5.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH] eal: set hugepgae_sz to 4KB when using --no-huge 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: Wed, 15 Jul 2015 10:12:03 -0000 After code rework from bellow commit, logic expects hugepage_sz field to always be set (ie. not zero value). When using --no-huge, this field was left unset defaulting to zero. Set hugepage_sz to RTE_PGSIZE_4K when using --no-huge. Fixes: b3dfffd962ecd ("mem: allow multiple page sizes to be requested") Signed-off-by: Sergio Gonzalez Monroy --- lib/librte_eal/bsdapp/eal/eal_memory.c | 1 + lib/librte_eal/linuxapp/eal/eal_memory.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c index 33ebd0f..a3242a5 100644 --- a/lib/librte_eal/bsdapp/eal/eal_memory.c +++ b/lib/librte_eal/bsdapp/eal/eal_memory.c @@ -75,6 +75,7 @@ rte_eal_contigmem_init(void) addr = malloc(internal_config.memory); mcfg->memseg[0].phys_addr = (phys_addr_t)(uintptr_t)addr; mcfg->memseg[0].addr = addr; + mcfg->memseg[0].hugepage_sz = RTE_PGSIZE_4K; mcfg->memseg[0].len = internal_config.memory; mcfg->memseg[0].socket_id = 0; return 0; diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index e501c49..4fd63bb 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -1069,6 +1069,7 @@ rte_eal_hugepage_init(void) } mcfg->memseg[0].phys_addr = (phys_addr_t)(uintptr_t)addr; mcfg->memseg[0].addr = addr; + mcfg->memseg[0].hugepage_sz = RTE_PGSIZE_4K; mcfg->memseg[0].len = internal_config.memory; mcfg->memseg[0].socket_id = SOCKET_ID_ANY; return 0; -- 1.9.3