Message ID | 20170626102428.17490-1-petri.savolainen@linaro.org |
---|---|
State | New |
Headers | show |
Ping. I think it's better to modify only this application now, and update other apps once the new API is released into master. Otherwise, we would increase diff between api-next vs master. Most apps do odp_init_global(&instance, NULL, NULL) today, so there's no performance difference. This change enables testing the difference with l2fwd. > -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Petri > Savolainen > Sent: Monday, June 26, 2017 1:24 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [API-NEXT PATCH] test: l2fwd: list not used features > > List not used features so that performance may be optimized > on some platforms. E.g. on odp-linux implementation, timer > polling causes high overhead, which is disabled when timers > are not used. > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > --- > test/common_plat/performance/odp_l2fwd.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/test/common_plat/performance/odp_l2fwd.c > b/test/common_plat/performance/odp_l2fwd.c > index 78b3633b..851614d6 100644 > --- a/test/common_plat/performance/odp_l2fwd.c > +++ b/test/common_plat/performance/odp_l2fwd.c > @@ -1387,9 +1387,19 @@ int main(int argc, char *argv[]) > odp_instance_t instance; > int num_groups; > odp_schedule_group_t group[MAX_PKTIOS]; > + odp_init_t init; > + > + odp_init_param_init(&init); > + > + /* List features not to be used (may optimize performance) */ > + init.not_used.feat.cls = 1; > + init.not_used.feat.crypto = 1; > + init.not_used.feat.ipsec = 1; > + init.not_used.feat.timer = 1; > + init.not_used.feat.tm = 1; > > /* Init ODP before calling anything else */ > - if (odp_init_global(&instance, NULL, NULL)) { > + if (odp_init_global(&instance, &init, NULL)) { > LOG_ERR("Error: ODP global init failed.\n"); > exit(EXIT_FAILURE); > } > -- > 2.13.0
On Mon, Jun 26, 2017 at 5:24 AM, Petri Savolainen <petri.savolainen@linaro.org> wrote: > List not used features so that performance may be optimized > on some platforms. E.g. on odp-linux implementation, timer > polling causes high overhead, which is disabled when timers > are not used. > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > test/common_plat/performance/odp_l2fwd.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c > index 78b3633b..851614d6 100644 > --- a/test/common_plat/performance/odp_l2fwd.c > +++ b/test/common_plat/performance/odp_l2fwd.c > @@ -1387,9 +1387,19 @@ int main(int argc, char *argv[]) > odp_instance_t instance; > int num_groups; > odp_schedule_group_t group[MAX_PKTIOS]; > + odp_init_t init; > + > + odp_init_param_init(&init); > + > + /* List features not to be used (may optimize performance) */ > + init.not_used.feat.cls = 1; > + init.not_used.feat.crypto = 1; > + init.not_used.feat.ipsec = 1; > + init.not_used.feat.timer = 1; > + init.not_used.feat.tm = 1; > > /* Init ODP before calling anything else */ > - if (odp_init_global(&instance, NULL, NULL)) { > + if (odp_init_global(&instance, &init, NULL)) { > LOG_ERR("Error: ODP global init failed.\n"); > exit(EXIT_FAILURE); > } > -- > 2.13.0 >
diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c index 78b3633b..851614d6 100644 --- a/test/common_plat/performance/odp_l2fwd.c +++ b/test/common_plat/performance/odp_l2fwd.c @@ -1387,9 +1387,19 @@ int main(int argc, char *argv[]) odp_instance_t instance; int num_groups; odp_schedule_group_t group[MAX_PKTIOS]; + odp_init_t init; + + odp_init_param_init(&init); + + /* List features not to be used (may optimize performance) */ + init.not_used.feat.cls = 1; + init.not_used.feat.crypto = 1; + init.not_used.feat.ipsec = 1; + init.not_used.feat.timer = 1; + init.not_used.feat.tm = 1; /* Init ODP before calling anything else */ - if (odp_init_global(&instance, NULL, NULL)) { + if (odp_init_global(&instance, &init, NULL)) { LOG_ERR("Error: ODP global init failed.\n"); exit(EXIT_FAILURE); }
List not used features so that performance may be optimized on some platforms. E.g. on odp-linux implementation, timer polling causes high overhead, which is disabled when timers are not used. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- test/common_plat/performance/odp_l2fwd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.13.0