mem: fix initialization with --no-huge option
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Wed, 15 Jul 2015 10:12:00 +0000 (11:12 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 15 Jul 2015 12:25:37 +0000 (14:25 +0200)
commitfc060aa614ca72576da2626ca74bcc6694d613c9
tree5fcd80dfc4803155340a3b9fae95692b6c1076b5
parent184abcf525596861a443a6846b8468dd625e2777
mem: fix initialization with --no-huge option

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 <sergio.gonzalez.monroy@intel.com>
lib/librte_eal/bsdapp/eal/eal_memory.c
lib/librte_eal/linuxapp/eal/eal_memory.c