summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_dummynet.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>1999-08-11 14:37:58 +0000
committerluigi <luigi@FreeBSD.org>1999-08-11 14:37:58 +0000
commitfa3e4896b3bb4da7e76a8673fc0676d70252d8b2 (patch)
tree59e654eaad8ac8166a7531b18ff98649754c133d /sys/netinet/ip_dummynet.c
parentc40a704ac371220921033271374c72c911e95910 (diff)
downloadFreeBSD-src-fa3e4896b3bb4da7e76a8673fc0676d70252d8b2.zip
FreeBSD-src-fa3e4896b3bb4da7e76a8673fc0676d70252d8b2.tar.gz
Add spl() protection to remove that the timer is invoked multiple
times resulting in higher bandwidth and lower delays. Reported-by: Jamshid Madhavi
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r--sys/netinet/ip_dummynet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index c097f7c..e1c45e8 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -10,7 +10,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_dummynet.c,v 1.14 1999/05/04 16:20:30 luigi Exp $
+ * $Id: ip_dummynet.c,v 1.15 1999/05/06 22:08:57 peter Exp $
*/
/*
@@ -274,8 +274,10 @@ dummynet(void * __unused unused)
/*
* finally, if some queue has data, restart the timer.
*/
+ s = splimp();
dn_idle = 1;
dn_restart();
+ splx(s);
}
/*
@@ -373,9 +375,9 @@ dummynet_io(int pipe_nr, int dir,
if (pipe->r.head == pkt) { /* process immediately */
dn_move(pipe, 1);
}
- splx(s);
if (dn_idle)
dn_restart();
+ splx(s);
return 0;
}
@@ -603,7 +605,7 @@ ip_dn_ctl(struct sockopt *sopt)
static void
ip_dn_init(void)
{
- printf("DUMMYNET initialized (990504)\n");
+ printf("DUMMYNET initialized (990811)\n");
all_pipes = NULL ;
ip_dn_ctl_ptr = ip_dn_ctl;
}
OpenPOWER on IntegriCloud