Re: netem and hierarchical ingress traffic shaping
From: Eric Dumazet <hidden>
Date: 2011-12-23 19:21:27
Le vendredi 23 décembre 2011 à 11:07 -0800, Stephen Hemminger a écrit :
skb_cb is the dumping ground of the networking layer. The assumption was that the qdisc could use the skb_cb for it's own scratchpad. Netem is using it for tagging packets in the queue. So basically, netem, choke, and sfb are incompatible with each other. This is not that bad, why not add a flag to qdisc ops to indicate which qdisc are using cb and block user from trying to do something bogus.
This is not how I planned to solve the problem.
I think we need an internal tfifo for netem use.
Then be able to add another qdisc on top of netem.
tfifo as a first stage, hardcoded (only limit is tunable)
[ optional 2nd stage, any qdisc ]
netem_queue()
{
queue packet to tfifo
(eventually at head, of reordering)
}
netem_dequeue()
{
if (other_qdisc) {
for_each_packet_from_tfifo_time_ready() {
other_qdisc->enqueue(skb);
}
try_to_dequeue_one_packet_from(other_qdisc);
} else {
dequeue_one_packet_from_tfifo_time_ready();
}
}