svn commit: r193435 - head/sys/netinet

Luigi Rizzo luigi at FreeBSD.org
Thu Jun 4 12:27:58 UTC 2009


Author: luigi
Date: Thu Jun  4 12:27:57 2009
New Revision: 193435
URL: http://svn.freebsd.org/changeset/base/193435

Log:
  fix a bug introduced in rev.190865 related to the signedness
  of the credit of a pipe. On passing, also use explicit
  signed/unsigned types for two other fields.
  Noticed by Oleg Bulyzhin and Maxim Ignatenko long ago,
  i forgot to commit the fix.
  
  Does not affect RELENG_7.

Modified:
  head/sys/netinet/ip_dummynet.h

Modified: head/sys/netinet/ip_dummynet.h
==============================================================================
--- head/sys/netinet/ip_dummynet.h	Thu Jun  4 11:22:53 2009	(r193434)
+++ head/sys/netinet/ip_dummynet.h	Thu Jun  4 12:27:57 2009	(r193435)
@@ -214,8 +214,8 @@ struct dn_flow_queue {
      * With large bandwidth and large delays, extra_bits (and also numbytes)
      * can become very large, so better play safe and use 64 bit
      */
-    dn_key numbytes ;		/* credit for transmission (dynamic queues) */
-    dn_key extra_bits;		/* extra bits simulating unavailable channel */
+    uint64_t numbytes ;		/* credit for transmission (dynamic queues) */
+    int64_t extra_bits;		/* extra bits simulating unavailable channel */
 
     u_int64_t tot_pkts ;	/* statistics counters	*/
     u_int64_t tot_bytes ;
@@ -338,7 +338,7 @@ struct dn_pipe {		/* a pipe */
     int sum;			/* sum of weights of all active sessions */
 
     /* Same as in dn_flow_queue, numbytes can become large */
-    dn_key numbytes;		/* bits I can transmit (more or less). */
+    int64_t numbytes;		/* bits I can transmit (more or less). */
 
     dn_key sched_time ;		/* time pipe was scheduled in ready_heap */
 


More information about the svn-src-head mailing list