examples/ip_pipeline: fix timer period unit
authorBao-Long Tran <longtb5@viettel.com.vn>
Wed, 31 Jan 2018 08:48:16 +0000 (15:48 +0700)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 6 Feb 2018 18:45:29 +0000 (19:45 +0100)
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>
examples/ip_pipeline/init.c

index 55d246f..bb07efa 100644 (file)
@@ -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;
        }
 }