[Top] [All Lists]

Re: [patch] 3c59x.c for 2.2.17

To: andrewm@xxxxxxxxxx (Andrew Morton)
Subject: Re: [patch] 3c59x.c for 2.2.17
From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Jun 2000 13:09:41 +0100 (BST)
Cc: alan@xxxxxxxxxxxxxxxxxxx (Alan Cox), netdev@xxxxxxxxxxx (netdev@xxxxxxxxxxx), toa@xxxxxxxxxxx (Andreas Tobler)
In-reply-to: <3955EB11.519DF76B@xxxxxxxxxx> from "Andrew Morton" at Jun 25, 2000 09:20:49 PM
Sender: owner-netdev@xxxxxxxxxxx
> - 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.


> - 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

<Prev in Thread] Current Thread [Next in Thread>