]> git.proxmox.com Git - mirror_ovs.git/commit - lib/tc.c
tc: Correct convert ticks to msecs on parsing tc TM
authorPaul Blakey <paulb@mellanox.com>
Sun, 30 Jul 2017 05:01:52 +0000 (08:01 +0300)
committerBen Pfaff <blp@ovn.org>
Thu, 3 Aug 2017 19:53:48 +0000 (12:53 -0700)
commit8c1e74d1c8e3aeb74b676da45ff0b04021083c35
tree414384520da2a3b3e2c41fbe5b189f525e4aadd4
parent08fa0266b6632111407f00de9bc6e118522204d6
tc: Correct convert ticks to msecs on parsing tc TM

Use sysconf(_SC_CLK_TCK) to read run time "number of clock ticks per
second" and use that to convert ticks to msecs.
This is how iproute does the conversion when parsing tc filters.
The system call is done only once.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/tc.c