Date: Fri, 9 Apr 1999 20:52:19 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: net@freebsd.org Subject: possible dummynet enhancement (random pkt reordering) Message-ID: <199904091852.UAA01251@labinfo.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904091852.UAA01251>