From 3747d407a8cbf26aa887a81515ca063e7908ce58 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Sat, 17 Apr 2004 00:09:02 +0000 Subject: add a congestion indicator to if_queue. It is set when the input queue is full, along with a timer that unsets it again after 10ms. The input queue beeing full is a reliable indicator for CPU overload, and this flag allows other subsystems to cope with the situation. hacked with beck ok kjc@ markus@ beck@ --- sys/net/if_atmsubr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys/net/if_atmsubr.c') diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index f1bbeba56f5..efdc96f0c8d 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atmsubr.c,v 1.22 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: if_atmsubr.c,v 1.23 2004/04/17 00:09:01 henning Exp $ */ /* * @@ -354,11 +354,7 @@ atm_input(ifp, ah, m, rxhand) } s = splimp(); - if (IF_QFULL(inq)) { - IF_DROP(inq); - m_freem(m); - } else - IF_ENQUEUE(inq, m); + IF_INPUT_ENQUEUE(inq); splx(s); } -- cgit v1.2.3