From owner-freebsd-net Fri Apr 9 16:28:24 1999 Delivered-To: freebsd-net@freebsd.org Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (Postfix) with SMTP id 2844414D18 for ; Fri, 9 Apr 1999 16:28:20 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id UAA01251; Fri, 9 Apr 1999 20:52:19 +0200 From: Luigi Rizzo Message-Id: <199904091852.UAA01251@labinfo.iet.unipi.it> Subject: possible dummynet enhancement (random pkt reordering) To: net@freebsd.org Date: Fri, 9 Apr 1999 20:52:19 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1638 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Some time ago, a few people asked me on how to simulate pkt reordering with dummynet. I did have a few ideas but not so clear. However, the following seems a reasonably good method if someone feels like implementing it. (this is an excerpt from a reply i sent to Rick Jones at HP): ... reordering is slightly harder to do in a realistic way. I had an email exchange with somebody who wanted to implement it, and turned out that the simplest way would be to randomly decide to swap a pair of packets while they are in the first queue (the bw limiter). This way you preserve the throughput. Depending on which pkts you swap and how frequently you might have different effects which i have not studied in detail. But one reasonable way could be: whenever you can move a pkt from the R-queue to the P-queue, swap the first two pkts (i.e. the one that you would move, and the next one) with a random probability. Then, move the pkt to the P-queue. i think translating the above sentence from english to C should not take much more than a few lines of code... if you can do that, i would be much more interested to know how it works than in the actual code :) cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO . EMAIL: luigi@iet.unipi.it . Dip. di Ing. dell'Informazione HTTP://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message