On Wed, Apr 24, 2013 at 11:29 AM, Romain Lenglet <rleng...@vmware.com> wrote: > Send an optional OVS_PACKET_ATTR_TIMESTAMP attribute in upcalls with > the packet's timestamp. Add a corresponding tstamp attribute into > struct dpif_upcall. > > Enable Linux packet timestamping, only if at least one flow requires > it since Linux packet timestamping is set on or off for all packets. > Define a new DPIF_FP_TIMESTAMP flag for dpif_flow_put.flags to enable > timestamping for the lifetime of a flow. Add a new netlink > OVS_FLOW_ATTR_TIMESTAMP flag attribute to the Linux datapath's flow > set/mod/get/dump commands. Call net_enable_timestamp() and > net_disable_timestamp() only if that flag is set. > > Enable packet timestamping in the Linux datapath for flows with > "sample" or "ipfix" actions. Send microsecond-precision timestamps > received in upcalls in IPFIX flow records. > > Signed-off-by: Romain Lenglet <rleng...@vmware.com>
The biggest question which I have about this is how it interacts with hardware timestamping if it is available. It looks like this only turns on software timestamps and while that is probably often sufficient, it would be nice to take advantage of hardware if possible. The other example of using timestamps is in the socket layer and it seems like there are different methods for both enabling and retrieving timestamps for both hardware and software. I wonder how useful per-flow granularity is on enabling timestamps. It seems like per-port control is the finest granularity that might actually be useful. I think if we did that then the refcounting could be simplified as well. Is there really a need to define a new OVS time struct? It seems like using timespec or timeval would be preferable. What is the performance impact of turning on timestamps? If it is high (I remember that it is definitely measurable since we used to get timestamps on every packet for the purposes of flow expiration before it was optimized) then I wonder whether it is wise to require it whenever IPFIX is enabled since many use cases won't care. Actually, on a greater level I'm not sure that I quite see the value in very precise timestamps on random samples. How exactly would you analyze them? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev