提交 301f935b 编写于 作者: T Toke Høiland-Jørgensen 提交者: David S. Miller

sch_cake: Fix tin order when set through skb->priority

In diffserv mode, CAKE stores tins in a different order internally than
the logical order exposed to userspace. The order remapping was missing
in the handling of 'tc filter' priority mappings through skb->priority,
resulting in bulk and best effort mappings being reversed relative to
how they are displayed.

Fix this by adding the missing mapping when reading skb->priority.

Fixes: 83f8fd69 ("sch_cake: Add DiffServ handling")
Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1eb94d44
...@@ -1546,7 +1546,7 @@ static struct cake_tin_data *cake_select_tin(struct Qdisc *sch, ...@@ -1546,7 +1546,7 @@ static struct cake_tin_data *cake_select_tin(struct Qdisc *sch,
if (TC_H_MAJ(skb->priority) == sch->handle && if (TC_H_MAJ(skb->priority) == sch->handle &&
TC_H_MIN(skb->priority) > 0 && TC_H_MIN(skb->priority) > 0 &&
TC_H_MIN(skb->priority) <= q->tin_cnt) { TC_H_MIN(skb->priority) <= q->tin_cnt) {
tin = TC_H_MIN(skb->priority) - 1; tin = q->tin_order[TC_H_MIN(skb->priority) - 1];
if (q->rate_flags & CAKE_FLAG_WASH) if (q->rate_flags & CAKE_FLAG_WASH)
cake_wash_diffserv(skb); cake_wash_diffserv(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册