Message ID | 1469675371-20274-1-git-send-email-forrest.shi@linaro.org |
---|---|
State | New |
Headers | show |
On 07/28/16 06:09, forrest.shi@linaro.org wrote: > From: Xuelin Shi <forrest.shi@linaro.org> > > release resouces on exit. > > Signed-off-by: Xuelin Shi <forrest.shi@linaro.org> > --- > example/l2fwd_simple/odp_l2fwd_simple.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/example/l2fwd_simple/odp_l2fwd_simple.c b/example/l2fwd_simple/odp_l2fwd_simple.c > index 8a14e7d..b351b03 100644 > --- a/example/l2fwd_simple/odp_l2fwd_simple.c > +++ b/example/l2fwd_simple/odp_l2fwd_simple.c > @@ -195,5 +195,20 @@ int main(int argc, char **argv) > odph_odpthreads_create(thd, &cpumask, &thr_params); > odph_odpthreads_join(thd); > > + if (odp_pool_destroy(pool)) { > + printf("Error: pool destroy\n"); > + exit(EXIT_FAILURE); > + } > + > + if (odp_term_local()) { > + printf("Error: term local\n"); > + exit(EXIT_FAILURE); > + } > + > + if (odp_term_global(instance)) { > + printf("Error: term global\n"); > + exit(EXIT_FAILURE); > + } > + > return 0; > } you just added code that is not called due to in current example all threads will spin forever in join(). You also need modify logic to make that functions called under 'make check' Maxim.
Hello Forest, are you planning to update that patches? Maxim. On 07/28/16 06:09, forrest.shi@linaro.org wrote: > From: Xuelin Shi <forrest.shi@linaro.org> > > release resouces on exit. > > Signed-off-by: Xuelin Shi <forrest.shi@linaro.org> > --- > example/l2fwd_simple/odp_l2fwd_simple.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/example/l2fwd_simple/odp_l2fwd_simple.c b/example/l2fwd_simple/odp_l2fwd_simple.c > index 8a14e7d..b351b03 100644 > --- a/example/l2fwd_simple/odp_l2fwd_simple.c > +++ b/example/l2fwd_simple/odp_l2fwd_simple.c > @@ -195,5 +195,20 @@ int main(int argc, char **argv) > odph_odpthreads_create(thd, &cpumask, &thr_params); > odph_odpthreads_join(thd); > > + if (odp_pool_destroy(pool)) { > + printf("Error: pool destroy\n"); > + exit(EXIT_FAILURE); > + } > + > + if (odp_term_local()) { > + printf("Error: term local\n"); > + exit(EXIT_FAILURE); > + } > + > + if (odp_term_global(instance)) { > + printf("Error: term global\n"); > + exit(EXIT_FAILURE); > + } > + > return 0; > }
Hi Maxim, Sorry for late response. I was outing on Friday/Weekend. I'm OK with your updates. thanks, Forrest 在 8/18/2016 6:39 PM, Maxim Uvarov 写道: > Hello Forest, are you planning to update that patches? > > Maxim. > > On 07/28/16 06:09, forrest.shi@linaro.org wrote: >> From: Xuelin Shi <forrest.shi@linaro.org> >> >> release resouces on exit. >> >> Signed-off-by: Xuelin Shi <forrest.shi@linaro.org> >> --- >> example/l2fwd_simple/odp_l2fwd_simple.c | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/example/l2fwd_simple/odp_l2fwd_simple.c >> b/example/l2fwd_simple/odp_l2fwd_simple.c >> index 8a14e7d..b351b03 100644 >> --- a/example/l2fwd_simple/odp_l2fwd_simple.c >> +++ b/example/l2fwd_simple/odp_l2fwd_simple.c >> @@ -195,5 +195,20 @@ int main(int argc, char **argv) >> odph_odpthreads_create(thd, &cpumask, &thr_params); >> odph_odpthreads_join(thd); >> + if (odp_pool_destroy(pool)) { >> + printf("Error: pool destroy\n"); >> + exit(EXIT_FAILURE); >> + } >> + >> + if (odp_term_local()) { >> + printf("Error: term local\n"); >> + exit(EXIT_FAILURE); >> + } >> + >> + if (odp_term_global(instance)) { >> + printf("Error: term global\n"); >> + exit(EXIT_FAILURE); >> + } >> + >> return 0; >> } >
thanks. On 08/22/16 10:48, forrest.shi wrote: > Hi Maxim, > > Sorry for late response. I was outing on Friday/Weekend. > > I'm OK with your updates. > > thanks, > Forrest > > 在 8/18/2016 6:39 PM, Maxim Uvarov 写道: >> Hello Forest, are you planning to update that patches? >> >> Maxim. >> >> On 07/28/16 06:09, forrest.shi@linaro.org wrote: >>> From: Xuelin Shi <forrest.shi@linaro.org> >>> >>> release resouces on exit. >>> >>> Signed-off-by: Xuelin Shi <forrest.shi@linaro.org> >>> --- >>> example/l2fwd_simple/odp_l2fwd_simple.c | 15 +++++++++++++++ >>> 1 file changed, 15 insertions(+) >>> >>> diff --git a/example/l2fwd_simple/odp_l2fwd_simple.c >>> b/example/l2fwd_simple/odp_l2fwd_simple.c >>> index 8a14e7d..b351b03 100644 >>> --- a/example/l2fwd_simple/odp_l2fwd_simple.c >>> +++ b/example/l2fwd_simple/odp_l2fwd_simple.c >>> @@ -195,5 +195,20 @@ int main(int argc, char **argv) >>> odph_odpthreads_create(thd, &cpumask, &thr_params); >>> odph_odpthreads_join(thd); >>> + if (odp_pool_destroy(pool)) { >>> + printf("Error: pool destroy\n"); >>> + exit(EXIT_FAILURE); >>> + } >>> + >>> + if (odp_term_local()) { >>> + printf("Error: term local\n"); >>> + exit(EXIT_FAILURE); >>> + } >>> + >>> + if (odp_term_global(instance)) { >>> + printf("Error: term global\n"); >>> + exit(EXIT_FAILURE); >>> + } >>> + >>> return 0; >>> } >> >
diff --git a/example/l2fwd_simple/odp_l2fwd_simple.c b/example/l2fwd_simple/odp_l2fwd_simple.c index 8a14e7d..b351b03 100644 --- a/example/l2fwd_simple/odp_l2fwd_simple.c +++ b/example/l2fwd_simple/odp_l2fwd_simple.c @@ -195,5 +195,20 @@ int main(int argc, char **argv) odph_odpthreads_create(thd, &cpumask, &thr_params); odph_odpthreads_join(thd); + if (odp_pool_destroy(pool)) { + printf("Error: pool destroy\n"); + exit(EXIT_FAILURE); + } + + if (odp_term_local()) { + printf("Error: term local\n"); + exit(EXIT_FAILURE); + } + + if (odp_term_global(instance)) { + printf("Error: term global\n"); + exit(EXIT_FAILURE); + } + return 0; }