diff options
author | Willem de Bruijn <willemb@google.com> | 2014-08-04 22:11:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-05 16:35:54 -0700 |
commit | e7fd2885385157d46c85f282fc6d7d297db43e1f (patch) | |
tree | 14e9d00ed87b2b45882c8cb8dd1b9b4d221724f8 /net/core/dev.c | |
parent | 09c2d251b70723650ba47e83571ff49281320f7c (diff) | |
download | op-kernel-dev-e7fd2885385157d46c85f282fc6d7d297db43e1f.zip op-kernel-dev-e7fd2885385157d46c85f282fc6d7d297db43e1f.tar.gz |
net-timestamp: SCHED timestamp on entering packet scheduler
Kernel transmit latency is often incurred in the packet scheduler.
Introduce a new timestamp on transmission just before entering the
scheduler. When data travels through multiple devices (bonding,
tunneling, ...) each device will export an individual timestamp.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index b370230..1c15b18 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -132,6 +132,7 @@ #include <linux/hashtable.h> #include <linux/vmalloc.h> #include <linux/if_macvlan.h> +#include <linux/errqueue.h> #include "net-sysfs.h" @@ -2876,6 +2877,9 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv) skb_reset_mac_header(skb); + if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_SCHED_TSTAMP)) + __skb_tstamp_tx(skb, NULL, skb->sk, SCM_TSTAMP_SCHED); + /* Disable soft irqs for various locks below. Also * stops preemption for RCU. */ |