Message ID | 1456354762-1326-3-git-send-email-gary.robertson@linaro.org |
---|---|
State | New |
Headers | show |
diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 5ffc542..a3710ba 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -1003,8 +1003,10 @@ int main(int argc, char **argv) odp_shm_t shm; int max_thrs; - if (odp_init_global(NULL, NULL) != 0) - LOG_ABORT("Failed global init.\n"); + ret = parse_isolation_options(&argc, argv); + + if (odph_init_global() != 0) + LOG_ABORT("Failed global isolation init.\n"); if (odp_init_local(ODP_THREAD_CONTROL) != 0) LOG_ABORT("Failed local init.\n"); @@ -1052,5 +1054,7 @@ int main(int argc, char **argv) test_term(); } + odph_term_global(); + return ret; }
This is an example of how to apply the command line option parsing code in patch 1 of this series to an existing application. This same technique would be applied in order to add isolation support via the isolation helper code currently being developed for ODP. This patch is included only for informational purposes and is not yet suggested as a modification to current git repositories. Note the inclusion of the isolation parsing function call inserted ahead of any other command line option handlers, and also prior to ODP global initialization. Note also the 'odph*' wrapper function substituted for the call to odp_init_global() -and- the paired complementary wrapper function for ODP instance global termination processing. Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> --- test/performance/odp_pktio_perf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)