summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-01-25 15:50:24 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-01-25 15:50:24 +0000
commit7f98183ce8efdc796c2162ea8c97215f065b50cc (patch)
tree8515ce3ba8013b9744d184bc4c051b86b72b9f03 /sys/netinet/ip_input.c
parent4a25b25105a9c0d1cf01b43690b377f973552870 (diff)
Add a drain hook to each pool. This hook is called in three cases.
1. When a pool hit the hard limit. Just before bailing out/sleeping. 2. When an allocator fails to allocate memory (with PR_NOWAIT). 3. Just before trying to reclaim some page in pool_reclaim. The function called form the hook should try to free some items to the pool if possible. Convert m_reclaim hooks that were embedded in MCLGET, MGET and MGETHDR into a pool drain hook (making the code much cleaner).
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index d56f81437e0..be6d19b40d4 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.97 2002/01/23 00:39:48 art Exp $ */
+/* $OpenBSD: ip_input.c,v 1.98 2002/01/25 15:50:23 art Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -262,12 +262,9 @@ struct route ipforward_rt;
void
ipintr()
{
- register struct mbuf *m;
+ struct mbuf *m;
int s;
- if (needqueuedrain)
- m_reclaim();
-
while (1) {
/*
* Get next datagram off input queue and get IP header