mem: add function to walk all memsegs
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 11 Apr 2018 12:30:00 +0000 (13:30 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 11 Apr 2018 17:47:25 +0000 (19:47 +0200)
commit2b9f98d8a596fa552313fd4a79d182d062a26305
tree7ee6f5286caa0fe1a460d59967c76e44e5543fb6
parentba0009560c30fcd0cc350481d3877438616146e4
mem: add function to walk all memsegs

For code that might need to iterate over list of allocated
segments, using this API will make it more resilient to
internal API changes and will prevent copying the same
iteration code over and over again.

Additionally, down the line there will be locking implemented,
so users of this API will not need to care about locking
either.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
lib/librte_eal/common/eal_common_memory.c
lib/librte_eal/common/include/rte_memory.h
lib/librte_eal/rte_eal_version.map