From owner-svn-src-head@FreeBSD.ORG Thu Jun 4 12:27:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF611065672; Thu, 4 Jun 2009 12:27:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3088FC1B; Thu, 4 Jun 2009 12:27:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n54CRvWf091601; Thu, 4 Jun 2009 12:27:57 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n54CRv4p091600; Thu, 4 Jun 2009 12:27:57 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200906041227.n54CRv4p091600@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 4 Jun 2009 12:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193435 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 12:27:58 -0000 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 */