Received: by oss.sgi.com id ; Sun, 25 Jun 2000 16:40:41 -0700 Received: from [203.126.247.144] ([203.126.247.144]:56501 "EHLO zsngs001") by oss.sgi.com with ESMTP id ; Sun, 25 Jun 2000 16:40:06 -0700 Received: from zsngd101.asiapac.nortel.com (actually znsgd101) by zsngs001; Mon, 26 Jun 2000 07:38:45 +0800 Received: from zctwb003.asiapac.nortel.com ([47.152.32.111]) by zsngd101.asiapac.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NQ12PV25; Mon, 26 Jun 2000 07:38:49 +0800 Received: from pwold011.asiapac.nortel.com ([47.181.193.45]) by zctwb003.asiapac.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NCLF8N7C; Mon, 26 Jun 2000 09:38:52 +1000 Received: from uow.edu.au (IDENT:akpm@localhost [127.0.0.1]) by pwold011.asiapac.nortel.com (8.9.3/8.9.3) with ESMTP id JAA19767; Mon, 26 Jun 2000 09:37:24 +1000 Message-ID: <395697B3.5C83F98A@uow.edu.au> Date: Sun, 25 Jun 2000 23:37:23 +0000 X-Sybari-Space: 00000000 00000000 00000000 From: Andrew Morton X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.4.0-test1-ac10 i686) X-Accept-Language: en MIME-Version: 1.0 To: Donald Becker CC: Alan Cox , "netdev@oss.sgi.com" Subject: Re: [patch] 3c59x.c for 2.2.17 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Orig: Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing Content-Length: 879 Lines: 26 Donald Becker wrote: > > On Sun, 25 Jun 2000, Alan Cox wrote: > > > > - 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 previous code would allow operation even if not all buffers could be > allocated. This is a good thing. I agree. I think. This is fairly easy to do: partially fill the rx ring and leave the other slots with a NULL skb, and set cur_rx and dirty_rx appropriately. Then hope that boomerang_rx will eventually fill the ring up. However, the risk of losing some of the first 10-20 packets after an ifup is unattractive - ARP, DHCP, NIS, etc. > I suppose the correct operation is to refuse to start if no buffers at all > can be allocated. Yes. The open() code _was_ referencing the -1'th ring entry in this situation..