mempool: fix pages computation to determine number of objects
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Wed, 27 May 2015 08:40:05 +0000 (09:40 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 29 May 2015 18:27:23 +0000 (20:27 +0200)
commit41ba94ca98337ab010a790f61150143a70e03aaa
treedac6c53bbdb7c916380a0d58c4df0f4fb5b78fe8
parente221e274aa453a8a4674c9998984123792dad505
mempool: fix pages computation to determine number of objects

In rte_mempool_obj_iter(), when element boundary coincides with page boundary,
even if a single page is required per object, a loop checks that the next page
is contiguous and drops the first one otherwise.
This commit checks subsequent pages only when several are required per object.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
lib/librte_mempool/rte_mempool.c