Received: by oss.sgi.com id ; Sun, 25 Jun 2000 05:14:20 -0700 Received: from lightning.swansea.uk.linux.org ([194.168.151.1]:31572 "EHLO the-village.bc.nu") by oss.sgi.com with ESMTP id ; Sun, 25 Jun 2000 05:13:54 -0700 Received: from alan by the-village.bc.nu with local (Exim 2.12 #1) id 136BEN-0002B9-00; Sun, 25 Jun 2000 13:09:43 +0100 Subject: Re: [patch] 3c59x.c for 2.2.17 To: andrewm@uow.edu.au (Andrew Morton) Date: Sun, 25 Jun 2000 13:09:41 +0100 (BST) Cc: alan@lxorguk.ukuu.org.uk (Alan Cox), netdev@oss.sgi.com (netdev@oss.sgi.com), toa@pop.agri.ch (Andreas Tobler) In-Reply-To: <3955EB11.519DF76B@uow.edu.au> from "Andrew Morton" at Jun 25, 2000 09:20:49 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: Alan Cox Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing > - The driver would crash the machine if all dev_alloc_skb()'s failed > during open(). So I simply fail the open() if we can't preallocate all > the skb's. Ok > - The problem reported by Mark Hemment where the rx path would die if 32 > successive dev_alloc_skb()'s failed has been semi-kludgily fixed by > detecting this situation in the tx interrupt and deliberately calling > the rx ISR. This means that in cruel OOM situations we're relying on Tx > interrupts to initiate polling for available memory. This can take some > time if TCP has backed off a long way, but it recovers eventually. This is a mess in a lot of Don Becker skeleton base drivers. Its much cleaner if the last ring buffer slot is about to be used and the new alloc fails to simply recycle the buffer and throw the received packet away. Several drivers simply require the ring remains full and they are a lot cleaner for it. Will apply