From: Yang Yingliang Date: Wed, 25 Dec 2013 09:35:14 +0000 (+0800) Subject: sch_netem: more precise length of packets X-Git-Tag: v3.14-rc1~94^2~346 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cfd88d6d70735c47b17aef855b4c81dde83c85c;p=platform%2Fkernel%2Flinux-stable.git 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 Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index f3befd6..9632a4e 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;