aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2018-01-12 20:24:06 +0100
committerMichal Mazur <mkm@semihalf.com>2018-01-17 21:51:41 +0100
commit236d93cff3b34bb71e448f3c57af5b94589941cb (patch)
tree78dd207aa38971e011e82f704f2c134e7aa6de0b
parent571ce47d2afc1e138010dc62c21d10367555b2eb (diff)
plugins: odp: Get address range from pool info
Adjust ODP plugin for Caterpillar release. Address range of packet pool can be obtained using odp_pool_info API. Change-Id: I0b0175cce4d9e44ca27709d1dbca560a4a72b5a1 Signed-off-by: Michal Mazur <mkm@semihalf.com>
-rwxr-xr-xsrc/plugins/odp/odp_packet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/odp/odp_packet.c b/src/plugins/odp/odp_packet.c
index e1b259f..ef640ff 100755
--- a/src/plugins/odp/odp_packet.c
+++ b/src/plugins/odp/odp_packet.c
@@ -543,9 +543,12 @@ odp_packet_init (vlib_main_t * vm)
mhash_init_vec_string (&om->if_index_by_host_if_name, sizeof (uword));
- vpm->virtual.start = params.pool_start;
- vpm->virtual.end = params.pool_end;
- vpm->virtual.size = params.pool_size;
+ /* Get address range of the pool */
+ odp_pool_info_t info;
+ odp_pool_info (om->pool, &info);
+ vpm->virtual.start = info.min_data_addr;
+ vpm->virtual.end = info.max_data_addr;
+ vpm->virtual.size = info.max_data_addr - info.min_data_addr + 1;
return 0;
}