svn commit: r218360 - head/sys/netinet/ipfw

Luigi Rizzo luigi at FreeBSD.org
Sat Feb 5 23:32:18 UTC 2011


Author: luigi
Date: Sat Feb  5 23:32:17 2011
New Revision: 218360
URL: http://svn.freebsd.org/changeset/base/218360

Log:
  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

Modified:
  head/sys/netinet/ipfw/ip_dn_io.c

Modified: head/sys/netinet/ipfw/ip_dn_io.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dn_io.c	Sat Feb  5 23:03:40 2011	(r218359)
+++ head/sys/netinet/ipfw/ip_dn_io.c	Sat Feb  5 23:32:17 2011	(r218360)
@@ -471,7 +471,7 @@ serve_sched(struct mq *q, struct dn_sch_
 			(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);
 	}
 


More information about the svn-src-all mailing list