From owner-freebsd-stable@FreeBSD.ORG Wed Jan 24 07:10:25 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7ADB516A401 for ; Wed, 24 Jan 2007 07:10:25 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id 08D2C13C457 for ; Wed, 24 Jan 2007 07:10:22 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id l0O7ALFU001183; Wed, 24 Jan 2007 18:10:21 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id l0O7ALQf001182; Wed, 24 Jan 2007 18:10:21 +1100 (EST) (envelope-from peter) Date: Wed, 24 Jan 2007 18:10:21 +1100 From: Peter Jeremy To: "Andresen, Jason R." Message-ID: <20070124071021.GG874@turion.vk2pj.dyndns.org> References: <53B52415C756A84E8A169F0E3673A3290E8BA4@IMCSRV6.MITRE.ORG> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <53B52415C756A84E8A169F0E3673A3290E8BA4@IMCSRV6.MITRE.ORG> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-stable@freebsd.org Subject: Re: Dummynet and simulating random delay X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 07:10:25 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 2007-Jan-23 14:22:54 -0500, Andresen, Jason R. wrote: >I have a project that requires me to simulate a link with varying but >well defined delay. The link is guarenteed to deliver packets in >order, so I wish to maintain that behavior with Dummynet. I don't think dummynet can do this in its current form. Based on a quick look at the source, the packet delivery time is set to the current time plus the current delay when the packet arrives (see sys/netinet/ip_dummynet.c:move_pkt(). This means that changing the delay will not affect existing queued packets. Changing dummynet to allow variable delays whilst maintaining packet order is not immediately trivial. The only option I can see would be to change the dummynet curr_time (net.inet.ip.dummynet.curr_time) to increment at variable rate instead of one count per tick. You would probably need to do some fiddling to provide anything better than very coarse delay variation. --=20 Peter Jeremy --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFtwZd/opHv/APuIcRAuRZAJkBcKMagvb62xrj0wAKKSwgFJQj3ACbB8aQ v9HNayCZ+N3XKXpVhCG0f6I= =fkgJ -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC--