From: Michal Mazur <m...@semihalf.com>

Implement support in odp_pool_info function to provide
address range of pool data available to application.

Pull request of related API change:
https://github.com/Linaro/odp/pull/200

Signed-off-by: Michal Mazur <m...@semihalf.com>
---
/** Email created from pull request 495 (semihalf-mazur-michal:master)
 ** https://github.com/Linaro/odp/pull/495
 ** Patch: https://github.com/Linaro/odp/pull/495.patch
 ** Base sha: 5a58bbf2bb331fd7dde2ebbc0430634ace6900fb
 ** Merge commit sha: 002dda1fe241b7d56834904f064161bc4f7857af
 **/
 platform/linux-generic/odp_pool.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/platform/linux-generic/odp_pool.c 
b/platform/linux-generic/odp_pool.c
index e5ba8982a..03578135c 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -693,6 +693,9 @@ int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t 
*info)
        if (pool->params.type == ODP_POOL_PACKET)
                info->pkt.max_num = pool->num;
 
+       info->min_data_addr = (uintptr_t)pool->base_addr;
+       info->max_data_addr = (uintptr_t)pool->base_addr + pool->shm_size - 1;
+
        return 0;
 }
 

Reply via email to