On 7/27/2017 11:32 AM, Simon Horman wrote:
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<pa...@mellanox.com>
Reviewed-by: Roi Dayan<r...@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.

I see, so if this patch does it for each dump of each flow, we might added (say) 100K system calls per second? doesn't sound cool to me... I guess we either need to make sure the system call is done very rarely or we can maybe add some flag to tc to get the dump in the units we need. Hopefully the 1st option (doing the system call rarely) is viable and we can go that path and avoid kernel UAPI changes and patching.

Or.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to