Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2001 10:24:50 -0500 
From:      Clark Jarvis <cjarvis@VCI.com>
To:        net@freebsd.org
Subject:   RE: potential infinite loop in network device drivers
Message-ID:  <76AE66BFB2FBD211A30B0008C7DF6C2D01718451@exchange.vci.com>

next in thread | raw e-mail | index | archive | help
> 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.
> 
> If the body of the loop takes approx the same as
> the packet interarrival time, you might end up stuck in
> the loop forever (and typically holding locks or with most
> interrupts masked off).
> 
> I would suggest that we slightly redesign such loops so that
> we limit the amt of time spent in them. This probably
> affects only 100M/1G interfaces these days, but still...

I remember thinking about this at one point, and deciding that it wasn't
worth working around.  The problem was that if you leave before cleaning up
all the interrupt conditions, you'll just get another interrupt and be right
back almost immediately anyway.  Yeah, you get a little window for other
things to happen, but not much, and you add overhead, slowing down what is
obviously a busy device.

It'll still be interesting to read the papers Garrett mentioned...
-- 
Clark


**********************************************************************
This email, and any files transmitted with it, are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email
in error please advise ismail@vci.com.
**********************************************************************


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?76AE66BFB2FBD211A30B0008C7DF6C2D01718451>