Subject: Re: [PATCH 5/5 v2] net: add old_queue_mapping into skb->cb

From: Stephen Hemminger <[email-masked]>
Date: Wed, 15 Dec 2010 08:19:23 -0800

On Wed, 15 Dec 2010 13:23:56 +0800
Changli Gao <[email-masked]> wrote:

> For the skbs returned from ifb, we should use the queue_mapping
> saved before ifb.
> 
> We save old queue_mapping in old_queue_mapping just before calling 
> dev_queue_xmit, and restore the old_queue_mapping to queue_mapping
> just before reinjecting the skb.
> 
> dev_pick_tx() use the current queue_mapping for the skbs reinjected
> by ifb.
> 
> A new struct dev_skb_cb is added, and valid in qdisc and gso layer.
> The original qdisc_skb_cb and DEV_GSO_CB are placed after dev_skb_cb.
> 
> Signed-off-by: Changli Gao <[email-masked]>

What about a more general mechanism that lets a layer push
some amount of data onto the skb and then pop it off.
Kind of link notes to self, maybe even encode them as netlink
(except netlink messages have excess padding).

This would allow nesting, and avoid cb[] clobbering.
The existing usage of cb[] is only because there wasn't a better
solution.

--