]> git.droids-corp.org - dpdk.git/commitdiff
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 55d246fabe9a8e22d7847b3b771f43458c63f1bf..bb07efa1352c599353d4620b576a67430222b194 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;
        }
 }