diff mbox series

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

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

Commit Message

Github ODP bot Oct. 27, 2017, 8 a.m. 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: d61d32590d1772b70b8dcd0d0ec44d29029d7443
 ** Merge commit sha: 436021e0a0bff8bda38fa420ebbc4545c97a7fc8
 **/
 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;
 }