dpif-netdev: Cache time_msec() calls for each received batch.
authorDaniele Di Proietto <diproiettod@vmware.com>
Wed, 15 Apr 2015 18:11:47 +0000 (19:11 +0100)
committerEthan Jackson <ethan@nicira.com>
Mon, 20 Apr 2015 19:49:41 +0000 (12:49 -0700)
commit11bfdaddf2035efe054b6a098dc3b8aeeb65eeb6
tree47b60f69d2529d7188f699038436b50192ffb0f2
parent9ff55ae284809bd63fe1c9c9a90b1733193e76cd
dpif-netdev: Cache time_msec() calls for each received batch.

Calling time_msec() (which calls clock_gettime()) too often might be
expensive.  With this commit OVS makes only one call per received
batch and caches the result.

Suggested-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/dpif-netdev.c