mem: fix alignment of requested virtual areas
The original code did not align any addresses that were requested as
page-aligned, but were different because addr_is_hint was set.
Below fix by Dariusz has introduced an issue where all unaligned addresses
were left as unaligned.
This patch is a partial revert of
commit
7fa7216ed48d ("mem: fix alignment of requested virtual areas")
and implements a proper fix for this issue, by asking for alignment in all
but the following two cases:
1) page size is equal to system page size, or
2) we got an aligned requested address, and will not accept a different one
This ensures that alignment is performed in all cases, except for those we
can guarantee that the address will not need alignment.
Fixes:
b7cc54187ea4 ("mem: move virtual area function in common directory")
Fixes:
7fa7216ed48d ("mem: fix alignment of requested virtual areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>