What I do is: when sk_buffs come in (the ones I want), I isolate them, unlink them, and orphan them and put them on a linked list of my own.
In the future, I send out these sk_buffs again, but instead of releasing the memory allocated to them, I need to preserve them after transmission -
so I increment the user count atomic_inc(&skb->users), and this prevents
the kfree_skb() function from freeing the sk_buff's memory.
The reason I'm keeping these sk_buffs is to do manipulation on their
payloads in the skb->data area, both before they are re-transmitted in the future. After transmission, I, again, do more modifications.
My question is: When I'm ready to re-modify a particular sk_buff, I need a gaurantee that the sk_buff has actually been transmitted so that I don't
modify the buff's data TWICE before it's transmitted.
I considered using the skb->destructor(), but this only gets called if the sk_buff is to actually get freed and all it's memory released, which is what I don't want.
Is there another mechanism to know for sure that an sk_buff has been transmitted?
Thanks, /*********************************/ Michael R. Hines Grad Student, Florida State Dept. Computer Science http://www.cs.fsu.edu/~mhines/ Jusqu'a ce que le futur vienne... /*********************************/
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/