Kaz and Alan,
thanks a lot!!! Your comments are VERY helpful :-) I think I found the
bugs :-} I probably should invite you for a "virtual" beer some time :-)
> You should set skb->free = 1 after allocating the buffer, otherwise it won't
> be freed properly by kfree_skb(). (At least in 2.0 kernels).
This was one of the problems! An obvious memory leak. When do I have to set
the skb->free flag to 1? In the wavelan_packet_xmit routine dev_kfree_skb
gets called without the free flag being set to 1. I guess the higher layer
handles this, or is this a memory leak?
If I use a skb for sending data, is the following sequence OK (with 2.0.*)?
skb = alloc_skb(some_size, GFP_ATOMIC);
...
... call the transmit routine with (skb->data, skb->len)
...
skb->free = 1;
kfree(skb, FREE_WRITE);
Doing a save_flags/cli/restore_flags sequence in an interrupt doesn't hurt,
does it? How does the meaning of the free flag change with the 2.1.* kernels?
I'll probably be using them soon :-)
> My advice: try running with your debugging function acting as a thin wrapper
> for printk. Change your sprintf buffer to auto, and disable the network
> dumping. See if the problem is still there.
That improved the running time from 5 to 10 minutes. But I had another
memory leak. Since I'm using my own ether protocol type I intercept those
packets at the wavelan_receive routine and handle them on my own to take
approriate action. After I'm done I forgot to free them!!! That was another
obvious memory leak. I've now been running the stuff for 1.5 hours, and I
hope it will still be that way when I come back tomorrow morning :-)
I'll let you guys know!
Thanks a lot again for your help,
Olaf
P.S. Did you also get some mail-bounces from the linux-net mail server?
----- The following addresses had transient non-fatal errors -----
<[EMAIL PROTECTED]>
----- Transcript of session follows -----
<[EMAIL PROTECTED]>... Deferred: Connection refused by vger.rutgers.edu.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]