diff options
-rw-r--r-- | net/core/dev.c | 5 | ||||
-rw-r--r-- | net/sched/sch_netem.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 343883f65ea7..dcc357e4f91e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1336,7 +1336,12 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1336 | { | 1336 | { |
1337 | struct packet_type *ptype; | 1337 | struct packet_type *ptype; |
1338 | 1338 | ||
1339 | #ifdef CONFIG_NET_CLS_ACT | ||
1340 | if (!(skb->tstamp.tv64 && (G_TC_FROM(skb->tc_verd) & AT_INGRESS))) | ||
1341 | net_timestamp(skb); | ||
1342 | #else | ||
1339 | net_timestamp(skb); | 1343 | net_timestamp(skb); |
1344 | #endif | ||
1340 | 1345 | ||
1341 | rcu_read_lock(); | 1346 | rcu_read_lock(); |
1342 | list_for_each_entry_rcu(ptype, &ptype_all, list) { | 1347 | list_for_each_entry_rcu(ptype, &ptype_all, list) { |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index d876b8734848..2b88295cb7b7 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -280,6 +280,14 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch) | |||
280 | if (unlikely(!skb)) | 280 | if (unlikely(!skb)) |
281 | return NULL; | 281 | return NULL; |
282 | 282 | ||
283 | #ifdef CONFIG_NET_CLS_ACT | ||
284 | /* | ||
285 | * If it's at ingress let's pretend the delay is | ||
286 | * from the network (tstamp will be updated). | ||
287 | */ | ||
288 | if (G_TC_FROM(skb->tc_verd) & AT_INGRESS) | ||
289 | skb->tstamp.tv64 = 0; | ||
290 | #endif | ||
283 | pr_debug("netem_dequeue: return skb=%p\n", skb); | 291 | pr_debug("netem_dequeue: return skb=%p\n", skb); |
284 | sch->q.qlen--; | 292 | sch->q.qlen--; |
285 | return skb; | 293 | return skb; |