[ovs-dev] [PATCH] tc: Correct convert ticks to msecs on parsing tc TM

Simon Horman simon.horman at netronome.com
Thu Jul 27 08:32:57 UTC 2017


On Thu, Jul 27, 2017 at 11:29:10AM +0300, Or Gerlitz wrote:
> On 7/27/2017 11:00 AM, Simon Horman wrote:
> >>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.
> >>
> >>Signed-off-by: Paul Blakey<paulb at mellanox.com>
> >>Reviewed-by: Roi Dayan<roid at mellanox.com>
> >This looks good to me
> 
> Is this/similar conversion is needed also for the non TC data-path? if yes,
> how they do it there? if not, can you elaborate who does it (the ovs kernel
> dp?)

Hi Or,

the Linux kernel datapath provides an OVS_FLOW_ATTR_USED attribute
whose value is in ms - converted from jiffies in the kernel using
ovs_flow_used_time(). So I don't think the conversion needs
to be done in user-space for that datapath.


More information about the dev mailing list