From owner-freebsd-net Thu Feb 8 17: 2:23 2001 Delivered-To: freebsd-net@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id DBAD337B684 for ; Thu, 8 Feb 2001 17:02:05 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.1/8.11.1) id f19125x06386; Thu, 8 Feb 2001 17:02:05 -0800 (PST) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200102090102.f19125x06386@iguana.aciri.org> Subject: potential infinite loop in network device drivers To: net@freebsd.org Date: Thu, 8 Feb 2001 17:02:05 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, 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... cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message