SNLE driver (Slow Network Link Emulating Driver)

Molnar Ingo (mingo@kaliban.csoma.elte.hu)
Sun, 14 Apr 1996 20:59:51 -0400 (EDT)


To be able to simulate slow networks (when doing timing dependent changes
to the networking code like delayed acks 8) :

---------> diff -u to loopback.c begins here -------->
--- loopback.c Mon Mar 25 07:58:21 1996
+++ slowback.c Sun Apr 14 20:16:52 1996
@@ -61,6 +61,15 @@
if (skb == NULL || dev == NULL)
return(0);

+#define BYTES_PER_SEC 1800
+ {
+ unsigned long timeout;
+
+ timeout=jiffies+skb->truesize*HZ/BYTES_PER_SEC;
+ while( jiffies < timeout ) schedule();
+ }
+#udef BYTES_PER_SEC
+
/*
* Optimise so buffers with skb->free=1 are not copied but
* instead are lobbed from tx queue to rx queue

<----- diff ended here <---------

Is this a bad idea? (i'm a bit worried about the "bh-s are disabled"
comment in loopback.c 8)).

-- mingo