netdev
[Top] [All Lists]

Re: [patch] tg3 ring buffer allocation error handling

To: Matt Mackall <mpm@xxxxxxxxxxx>
Subject: Re: [patch] tg3 ring buffer allocation error handling
From: Sven Schuster <schuster.sven@xxxxxx>
Date: Thu, 15 Apr 2004 00:02:54 +0200
Cc: Jeff Garzik <jgarzik@xxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20040414214510.GH1175@waste.org>
References: <20040414184642.GZ1175@waste.org> <20040414205959.GA22051@zion.homelinux.com> <20040414214510.GH1175@waste.org>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Wed, Apr 14, 2004 at 04:45:10PM -0500, Matt Mackall told us:
> > Please correct me if I'm wrong, but shouldn't the buffers from the 
> > irst allocation (RXD_OPAQUE_RING_STD) be freed (maybe via 
> > tg3_free_rings??) when we get an error here??
> 
> The buffers are freed in the module release path, which is invoked
> when we return failure here. Without this, we don't notice the
> allocation failure and instead blow up when we get traffic.

So thanks for correcting me :-) should have taken a closer look at
the tg3 source.


Sven

> 
> FYI, I last tested this on a mem=4M box, where it was very obvious
> that the 1M of ring buffers weren't leaking.
> 
> -- 
> Matt Mackall : http://www.selenic.com : Linux development and consulting

-- 
Linux zion 2.6.5 #1 Sun Apr 4 19:56:55 CEST 2004 i686 athlon i386 GNU/Linux
 00:01:49  up 10 days, 45 min,  2 users,  load average: 0.06, 0.05, 0.02

Attachment: pgpmhQGahM63D.pgp
Description: PGP signature

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