From: Andi Kleen <[EMAIL PROTECTED]> Date: Mon, 22 Aug 2005 03:34:16 +0200
> In theory the NIC could store it in a separate data structure, but > that would be wasteful IMHO because it would duplicate what a socket > does. So it's best to add a last_rcv_cpu field to the struct sock > and make sure the free callback can access it safely. That's an interesting idea. Another approach would be: 1) Determine that we don't care about the callback (ie. it gets reset to NULL) when the skb->dev changes, as would occur for forwarding, and certain kinds of firewalling and classification actions. 2) As a result of #1 we can put the callback into the netdev struct, the opaque "ARG" becomes superfluous since the thing you'd pass there (the device pointer) is implicit. 3) Add a "received on cpu" number to sk_buff, and the callback can inspect that. If smp_processor_id() is different from skb->recv_cpu, then the driver updates the table. - 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