> > Basically, you'll have skb->free_callback(skb, ARG), and > skb->free_callback_ARG. And when the SKB and it's memory > is about to get liberated, we'll call the callback instead > of doing the free if the callback is non-NULL.
One issue is that the NIC focus shouldn't be reprogrammed for every packet because that would be too expensive. So someone needs to remember the last value of smp_processor_id(). Best is probably to do that in the struct sock, otherwise the driver would need to keep redundant data structures around which would be ugly. I think it it's enough to make sure skb->sk stays valid during the callback, then the driver (or a common library callback) can maintain it in a struct sock field and only tell the driver when the CPU has changed. This would imply that skb->destructor would need to run after the callback which could cause problems if the callback actually destroys the skb. -Andi - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html