diff mbox series

[API-NEXT,v3,6/8] linux-gen: pool: implement max_num info

Message ID 1508760010-14064-7-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v3,1/8] api: pool: relax packet pool param num | expand

Commit Message

Github ODP bot Oct. 23, 2017, noon UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Implemented max_num info for packet pools.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 234 (psavol:next-pool-param)
 ** https://github.com/Linaro/odp/pull/234
 ** Patch: https://github.com/Linaro/odp/pull/234.patch
 ** Base sha: ec6510b33e8b96d6d6670efb9dc3c9101baed6c6
 ** Merge commit sha: e5f6958b8e62d20650a2ea4a0c17bed262ad2ae1
 **/
 platform/linux-generic/odp_pool.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index 40114093a..326cc82a0 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -701,6 +701,9 @@  int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info)
 	info->name = pool->name;
 	info->params = pool->params;
 
+	if (pool->params.type == ODP_POOL_PACKET)
+		info->pkt.max_num = pool->num;
+
 	return 0;
 }