Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2001 21:09:53 -0500 (EST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Luigi Rizzo <rizzo@aciri.org>
Cc:        net@FreeBSD.ORG
Subject:   potential infinite loop in network device drivers
Message-ID:  <200102090209.VAA60712@khavrinen.lcs.mit.edu>
In-Reply-To: <200102090102.f19125x06386@iguana.aciri.org>
References:  <200102090102.f19125x06386@iguana.aciri.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 8 Feb 2001 17:02:05 -0800 (PST), Luigi Rizzo <rizzo@aciri.org> said:

> it occurs to me that there is a potential infinite loop in
> most if not all ethernet drivers. Basically, on a
> receive interrupt, such drivers loop around the status word
> until the receive queue is drained.

One possible right way to deal with this is to get rid of the
two-level interrupt scheme (for fast interfaces at least) and push the
packets all the way through the network stack.  This will ensure that
if packets are arriving faster than we can handle them, they will be
dropped by the network interface with an ``insufficient resources''
error.

Another possible right way to deal with this is to move all network
processing into the lower level, and poll round-robin for packets
(with network interrupts disabled) until all network interfaces are
finished (or we need to give the user a time slice).

Both techniques were described in a paper by Jeff Mogul (then at DEC
in Palo Alto) about five years ago; I have a physical copy of the
paper buried somewhere in my office.

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102090209.VAA60712>