[v7,1/2] linux-generic: pool: Return address range in pool info

Message ID 1519412420-22861-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • linux-generic: pool: Return address range in pool info
Related show

Commit Message

Github ODP bot Feb. 23, 2018, 7 p.m.
From: Michal Mazur <mkm@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 <mkm@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: 79aeba092a0c85e26786ff8efbaeb71608ae1fa3
 **/
 platform/linux-generic/odp_pool.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

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;
 }