summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2009-06-04 12:27:57 +0000
committerluigi <luigi@FreeBSD.org>2009-06-04 12:27:57 +0000
commit88c056a07bd7f41543280f44bc1556d6294a3fa9 (patch)
tree39e81bb34a88361fe5266c4bb47c9f8a630e2ec0 /sys/netinet
parentfe6c57bb232715aec9f8d54fb338c2b631923323 (diff)
downloadFreeBSD-src-88c056a07bd7f41543280f44bc1556d6294a3fa9.zip
FreeBSD-src-88c056a07bd7f41543280f44bc1556d6294a3fa9.tar.gz
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.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_dummynet.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_dummynet.h b/sys/netinet/ip_dummynet.h
index 6e102f4..43e6842 100644
--- a/sys/netinet/ip_dummynet.h
+++ b/sys/netinet/ip_dummynet.h
@@ -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 */
OpenPOWER on IntegriCloud