diff mbox

[API-NEXT] test: l2fwd: list not used features

Message ID 20170626102428.17490-1-petri.savolainen@linaro.org
State New
Headers show

Commit Message

Petri Savolainen June 26, 2017, 10:24 a.m. UTC
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

Comments

Savolainen, Petri (Nokia - FI/Espoo) July 13, 2017, 8:44 a.m. UTC | #1
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
Bill Fischofer July 13, 2017, 11:23 a.m. UTC | #2
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 mbox

Patch

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);
 	}