summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2011-02-05 23:32:17 +0000
committerluigi <luigi@FreeBSD.org>2011-02-05 23:32:17 +0000
commit383285e43a4ed5c15b5b01f6703a6e72ae37e1e9 (patch)
tree9427a5a96af859414eb235e1e1d38bef49db0251 /sys/netinet
parent03ef5e5e31dae64276ae9a5b262c2a8958aaa86f (diff)
downloadFreeBSD-src-383285e43a4ed5c15b5b01f6703a6e72ae37e1e9.zip
FreeBSD-src-383285e43a4ed5c15b5b01f6703a6e72ae37e1e9.tar.gz
correct the 'output_time' of packets generated by dummynet.
In the dec.2009 rewrite I introduced a bug, using for the computation the arrival time instead of the time the packet has exited from the queue. The bandwidth computation was still correct because it is computed elsewhere, but traffic was sent out in bursts. The bug is also present in RELENG_8 after dec.2009 Thanks to Daikichi Osuga for investingating, finding and fixing the bug with detailed graphs of the behaviour before and after the fix. Submitted by: Daikichi Osuga MFC after: 2 weeks
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ipfw/ip_dn_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ipfw/ip_dn_io.c b/sys/netinet/ipfw/ip_dn_io.c
index 934216d..07376d7 100644
--- a/sys/netinet/ipfw/ip_dn_io.c
+++ b/sys/netinet/ipfw/ip_dn_io.c
@@ -471,7 +471,7 @@ serve_sched(struct mq *q, struct dn_sch_inst *si, uint64_t now)
(m->m_pkthdr.len * 8 + extra_bits(m, s));
si->credit -= len_scaled;
/* Move packet in the delay line */
- dn_tag_get(m)->output_time += s->link.delay ;
+ dn_tag_get(m)->output_time = dn_cfg.curr_time + s->link.delay ;
mq_append(&si->dline.mq, m);
}
OpenPOWER on IntegriCloud