diff options
author | jlemon <jlemon@FreeBSD.org> | 2003-03-04 23:19:55 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2003-03-04 23:19:55 +0000 |
commit | 04e28d5a816573d1300b4591306a8785d3ace29c (patch) | |
tree | f304f726e8973253d3e8a87e56119fec0276a61c /sys/kern/kern_poll.c | |
parent | 45fcac94f475f1d18d50dde4f72eb51ee4abddcc (diff) | |
download | FreeBSD-src-04e28d5a816573d1300b4591306a8785d3ace29c.zip FreeBSD-src-04e28d5a816573d1300b4591306a8785d3ace29c.tar.gz |
Update netisr handling; Each SWI now registers its queue, and all queue
drain routines are done by swi_net, which allows for better queue control
at some future point. Packets may also be directly dispatched to a netisr
instead of queued, this may be of interest at some installations, but
currently defaults to off.
Reviewed by: hsu, silby, jayanth, sam
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/kern/kern_poll.c')
-rw-r--r-- | sys/kern/kern_poll.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c index 0f3254e..aeb5f57 100644 --- a/sys/kern/kern_poll.c +++ b/sys/kern/kern_poll.c @@ -47,9 +47,8 @@ #endif static void netisr_poll(void); /* the two netisr handlers */ -void netisr_pollmore(void); +static void netisr_pollmore(void); -void init_device_poll(void); /* init routine */ void hardclock_device_poll(void); /* hook from hardclock */ void ether_poll(int); /* polling while in trap */ @@ -183,14 +182,15 @@ struct pollrec { static struct pollrec pr[POLL_LIST_LEN]; -/* - * register relevant netisr. Called from kern_clock.c: - */ -void +static void init_device_poll(void) { - register_netisr(NETISR_POLL, netisr_poll); + + netisr_register(NETISR_POLL, (netisr_t *)netisr_poll, NULL); + netisr_register(NETISR_POLLMORE, (netisr_t *)netisr_pollmore, NULL); } +SYSINIT(device_poll, SI_SUB_CLOCKS, SI_ORDER_MIDDLE, init_device_poll, NULL) + /* * Hook from hardclock. Tries to schedule a netisr, but keeps track @@ -236,7 +236,7 @@ hardclock_device_poll(void) if (phase != 0) suspect++; phase = 1; - schednetisr(NETISR_POLL); + schednetisrbits(1 << NETISR_POLL | 1 << NETISR_POLLMORE); phase = 2; } if (pending_polls++ > 0) @@ -289,9 +289,9 @@ netisr_pollmore() phase = 5; if (residual_burst > 0) { - schednetisr(NETISR_POLL); + schednetisrbits(1 << NETISR_POLL | 1 << NETISR_POLLMORE); /* will run immediately on return, followed by netisrs */ - return ; + return; } /* here we can account time spent in netisr's in this tick */ microuptime(&t); @@ -318,7 +318,7 @@ netisr_pollmore() poll_burst -= (poll_burst / 8); if (poll_burst < 1) poll_burst = 1; - schednetisr(NETISR_POLL); + schednetisrbits(1 << NETISR_POLL | 1 << NETISR_POLLMORE); phase = 6; } } |