[Top] [All Lists]

Re: [patch] 3c59x.c for 2.2.17

To: Donald Becker <becker@xxxxxxxxx>
Subject: Re: [patch] 3c59x.c for 2.2.17
From: Andrew Morton <andrewm@xxxxxxxxxx>
Date: Sun, 25 Jun 2000 23:37:23 +0000
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
References: <> <Pine.LNX.4.10.10006251240240.26261-100000@vaio.greennet>
Sender: owner-netdev@xxxxxxxxxxx
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

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