hi,
I am working on the bridging code.
Came across "Out of Memory" problem.
I don't know what is causing that.
Most importantly I am doing two things:
1) I'm using "dev_alloc_skb" to create new buffer to transmit
new packets using 'br_flood_forward()' but I am not freeing
that assuming that dev_queue_xmit() function will take care
of that, correct me if I am wrong.
2) I'm using "skb_copy" to duplicate the packet and use it
instead of the original, while the original is queued.
something like:
struct sk_buff *skbc = skb_copy(skb, GFP_ATOMIC);
if(skbc==NULL) {
kfree_skb(skb);
return 0;
}
.... do some processing with original 'skb'.....
br_flood_forward(br, skb, 0);
.... do some processing with duplicate, skbc .....
br_flood_forward(br, skbc, 0);
And, I am not freeing the copy either assuming it will be freed
at dev_queue_xmit().
I appreciate if any one can throw me some pointers.
Thanx,
Raj
ROI, PA
|