diff options
Diffstat (limited to 'odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch')
-rw-r--r-- | odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch b/odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch new file mode 100644 index 00000000..9185900e --- /dev/null +++ b/odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch @@ -0,0 +1,42 @@ +From 005d463e8c8e7598c17a18985601ac54a99d52c0 Mon Sep 17 00:00:00 2001 +From: Michal Mazur <mkm@semihalf.com> +Date: Fri, 12 Jan 2018 19:36:58 +0100 +Subject: [PATCH 1/4] linux-dpdk: pool: Return address range in pool info + +Implement support in odp_pool_info function to provide +address range of pool data available for application. + +Pull request of related API change: +https://github.com/Linaro/odp/pull/200 + +Signed-off-by: Michal Mazur <mkm@semihalf.com> +--- + platform/linux-dpdk/odp_pool.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/platform/linux-dpdk/odp_pool.c b/platform/linux-dpdk/odp_pool.c +index ee4a099..1cb1e12 100644 +--- a/platform/linux-dpdk/odp_pool.c ++++ b/platform/linux-dpdk/odp_pool.c +@@ -613,6 +613,7 @@ void odp_pool_print(odp_pool_t pool_hdl) + int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info) + { + pool_t *pool = pool_entry_from_hdl(pool_hdl); ++ struct rte_mempool_memhdr *hdr; + + if (pool == NULL || info == NULL) + return -1; +@@ -623,6 +624,10 @@ 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->rte_mempool->size; + ++ hdr = STAILQ_FIRST(&pool->rte_mempool->mem_list); ++ info->min_data_addr = (uint64_t)hdr->addr; ++ info->max_data_addr = (uint64_t)hdr->addr + hdr->len - 1; ++ + return 0; + } + +-- +2.7.4 + |