diff mbox series

[3/5] app/test-pmd: add to use apistats

Message ID 20201204075109.14694-4-yamashita.hideyuki@ntt-tx.co.jp (mailing list archive)
State Rejected
Delegated to: Ferruh Yigit
Headers show
Series add apistats function | expand

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Hideyuki Yamashita Dec. 4, 2020, 7:51 a.m. UTC
This patch modifies to use apistats by testpmd app.
- change on testpmd.c to call apistats functions to accumlate stats info

Signed-off-by: Hideyuki Yamashita <yamashtia.hideyuki@ntt-tx.co.jp>
---
 app/test-pmd/testpmd.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Varghese, Vipin Dec. 5, 2020, 1:04 p.m. UTC | #1
snipped
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -60,6 +60,8 @@
>  #ifdef RTE_LIB_LATENCYSTATS
>  #include <rte_latencystats.h>
>  #endif
> +#include <rte_apistats.h>
> +
> 
>  #include "testpmd.h"
> 
> @@ -3958,6 +3960,8 @@ main(int argc, char** argv)
>  	}
>  #endif
> 
> +	rte_apistats_init();
Suggestion, should there be am user argument or option to enable or disable the feature?

> +
>  	/* Setup bitrate stats */
>  #ifdef RTE_LIB_BITRATESTATS
>  	if (bitrate_enabled != 0) {
> --
> 2.18.0
diff mbox series

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 33fc0fd..e782bfe 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -60,6 +60,8 @@ 
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#include <rte_apistats.h>
+
 
 #include "testpmd.h"
 
@@ -3958,6 +3960,8 @@  main(int argc, char** argv)
 	}
 #endif
 
+	rte_apistats_init();
+
 	/* Setup bitrate stats */
 #ifdef RTE_LIB_BITRATESTATS
 	if (bitrate_enabled != 0) {