tempesta
tempesta copied to clipboard
Cache current time stamp
Motivation
There are dozens of tfw_current_timestamp() calls around the code, which executes ktime_get_real_ts64(), a relatively heavyweight kernel function. Meantime, Tempesta FW code doesn't require high precise timestamps, so this can be optimized.
Scope
Call the ``ktime_get_real_ts64()` only once per a softirq shot and cache the value in a per-cpu variable.