lkml.org 
[lkml]   [1996]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSNLE driver (Slow Network Link Emulating Driver)

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



\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans