summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_netem.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2013-12-25 10:35:14 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-31 20:31:43 +0100
commit8cfd88d6d70735c47b17aef855b4c81dde83c85c (patch)
treeaaa2f500d4ad6be09a89aeeee4d52eaa375d2868 /net/sched/sch_netem.c
parentnet/mlx4_en: Add netdev support for TCP/IP offloads of vxlan tunneling (diff)
downloadlinux-8cfd88d6d70735c47b17aef855b4c81dde83c85c.tar.xz
linux-8cfd88d6d70735c47b17aef855b4c81dde83c85c.zip
sch_netem: more precise length of packets
With TSO/GSO/GRO packets, skb->len doesn't represent a precise amount of bytes on wire. This patch replace skb->len with qdisc_pkt_len(skb) which is more precise. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r--net/sched/sch_netem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index f3befd6b4781..9632a4e753b7 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -495,7 +495,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
now = netem_skb_cb(last)->time_to_send;
}
- delay += packet_len_2_sched_time(skb->len, q);
+ delay += packet_len_2_sched_time(qdisc_pkt_len(skb), q);
}
cb->time_to_send = now + delay;