dev_kfree_skb() not freeing the memory

Pete Popov (ppopov@redcreek.com)
Mon, 01 Jun 1998 11:09:10 -0700


Hi,

I'm writing a driver for a proprietary
encryption adapter that's ethernet
based, and I ran into a problem that I
don't quite understand. I'm using
kernel 2.0.32.

Here's how the adapter/driver work:

* driver uses dev_alloc_skb() to grab a
number of buffers
* driver gives those buffers to the
adapter (the adapter is a busmaster)
* adapter fills the buffers with data
and generates an interrupt
* driver processes the buffers and
either sends them to the kernel, or
drops them
* driver grabs more skb buffers and
gives them to the adapter
* ...

* since the adapter is in promiscuous
mode (something I'll probably change),
the driver checks the mac to determine
if it should pass the skb buffer to the
kernel, or throw it away. If it decides
to throw it away, it calls
dev_kfree_skb() to release the buffer.
The problem is that the kernel does NOT
seem to be freeing the memory and
eventually the system runs out of
memory.

So, if you call dev_alloc_skb(), do you
HAVE to pass that buffer to the kernel
-- ie, if you decide to simply free it,
will the kernel free the memory?

Any help would be appreciated.

Thanks,

Pete Popov
Redcreek Communications
http://www.redcreek.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu