From: Dariusz Stojaczyk Date: Wed, 13 Jun 2018 19:08:14 +0000 (+0200) Subject: mem: fix alignment of requested virtual areas X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7fa7216ed48d;p=dpdk.git mem: fix alignment of requested virtual areas Although the alignment mechanism works as intended, the `no_align` bool flag was set incorrectly. We were aligning buffers that didn't need extra alignment, and weren't aligning ones that really needed it. Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory") Cc: stable@dpdk.org Signed-off-by: Dariusz Stojaczyk Acked-by: Anatoly Burakov --- diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c index ecc5bb2489..261fd775fa 100644 --- a/lib/librte_eal/common/eal_common_memory.c +++ b/lib/librte_eal/common/eal_common_memory.c @@ -70,7 +70,7 @@ eal_get_virtual_area(void *requested_addr, size_t *size, * system page size is the same as requested page size. */ no_align = (requested_addr != NULL && - ((uintptr_t)requested_addr & (page_sz - 1)) == 0) || + ((uintptr_t)requested_addr & (page_sz - 1))) || page_sz == system_page_sz; do {