diff options
author | Eric Dumazet <edumazet@google.com> | 2014-02-26 14:02:11 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-26 17:08:39 -0500 |
commit | 363ec392352e55c61ce2799c3f15f89f9429bba7 (patch) | |
tree | 7457074aafefd96ae6885038c040cad8d31853d9 /net/ipv4/tcp_hybla.c | |
parent | 20d8435a1cffa04992f1db6b199a5f0ccec2ff06 (diff) | |
download | linux-stable-363ec392352e55c61ce2799c3f15f89f9429bba7.tar.gz linux-stable-363ec392352e55c61ce2799c3f15f89f9429bba7.tar.bz2 linux-stable-363ec392352e55c61ce2799c3f15f89f9429bba7.zip |
net: add skb_mstamp infrastructure
ktime_get() is too expensive on some cases, and we'd like to get
usec resolution timestamps in TCP stack.
This patch adds a light weight facility using a combination of
local_clock() and jiffies samples.
Instead of :
u64 t0, t1;
t0 = ktime_get();
// stuff
t1 = ktime_get();
delta_us = ktime_us_delta(t1, t0);
use :
struct skb_mstamp t0, t1;
skb_mstamp_get(&t0);
// stuff
skb_mstamp_get(&t1);
delta_us = skb_mstamp_us_delta(&t1, &t0);
Note : local_clock() might have a (bounded) drift between cpus.
Do not use this infra in place of ktime_get() without understanding the
issues.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Larry Brakmo <brakmo@google.com>
Cc: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_hybla.c')
0 files changed, 0 insertions, 0 deletions