diff mbox

[dpdk-dev] examples/ip_pipeline: fix timer_period unit

Message ID 1517388677-17533-1-git-send-email-longtb5@viettel.com.vn (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

longtb5@viettel.com.vn Jan. 31, 2018, 8:48 a.m. UTC
The timer_period option specified by users via config file
should have unit of 1 millisecond. However timer_period is
internally converted to unit of 10 millisecond.

Fixes: 4e14069328fc ("examples/ip_pipeline: measure CPU utilization")

Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
---
 examples/ip_pipeline/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Singh, Jasvinder Feb. 6, 2018, 6:03 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of
> longtb5@viettel.com.vn
> Sent: Wednesday, January 31, 2018 8:48 AM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org; longtb5 <longtb5@viettel.com.vn>
> Subject: [dpdk-dev] [PATCH] examples/ip_pipeline: fix timer_period unit
> 
> The timer_period option specified by users via config file should have unit of
> 1 millisecond. However timer_period is internally converted to unit of 10
> millisecond.
> 
> Fixes: 4e14069328fc ("examples/ip_pipeline: measure CPU utilization")
> 
> Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
> ---
>  examples/ip_pipeline/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index
> 55d246f..bb07efa 100644
> --- a/examples/ip_pipeline/init.c
> +++ b/examples/ip_pipeline/init.c
> @@ -1704,7 +1704,7 @@ app_init_pipelines(struct app_params *app)
>  		data->ptype = ptype;
> 
>  		data->timer_period = (rte_get_tsc_hz() *
> -			params->timer_period) / 100;
> +			params->timer_period) / 1000;
>  	}
>  }

Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Thomas Monjalon Feb. 6, 2018, 6:45 p.m. UTC | #2
> > The timer_period option specified by users via config file should have unit of
> > 1 millisecond. However timer_period is internally converted to unit of 10
> > millisecond.
> > 
> > Fixes: 4e14069328fc ("examples/ip_pipeline: measure CPU utilization")

Cc: stable@dpdk.org

> > Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
> 
> Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>

Applied, thanks
diff mbox

Patch

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index 55d246f..bb07efa 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -1704,7 +1704,7 @@  app_init_pipelines(struct app_params *app)
 		data->ptype = ptype;
 
 		data->timer_period = (rte_get_tsc_hz() *
-			params->timer_period) / 100;
+			params->timer_period) / 1000;
 	}
 }