eal: add functions for previous power of 2 alignment
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Wed, 4 Apr 2018 13:20:16 +0000 (18:50 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 4 Apr 2018 15:33:08 +0000 (17:33 +0200)
commit08f683174e9487654a4720b4b7540f36a07b0918
tree294b9ad7218e68ae4b518a7f903598c7badb925b
parent5120203d753fe82305a7014706f54d973b8860cd
eal: add functions for previous power of 2 alignment

Add 32b and 64b API's to align the given integer to the previous power
of 2. Update common auto test to include test for previous power of 2 for
both 32 and 64bit integers.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
lib/librte_eal/common/include/rte_common.h
test/test/test_common.c