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.
This commit is contained in:
Luigi Rizzo 2009-06-04 12:27:57 +00:00
parent e38ee1f2b2
commit c421791e77
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193435

View File

@ -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 */