Add spl() protection to remove that the timer is invoked multiple
times resulting in higher bandwidth and lower delays. Reported-by: Jamshid Madhavi
This commit is contained in:
parent
c40a704ac3
commit
fa3e4896b3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user