From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [IPv6:2001:470:dc45:1000::1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 1E6D23BA8E for ; Mon, 16 Jul 2018 10:46:01 -0400 (EDT) From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1531752359; bh=8zD0hJfB+jQtOL3La+IWQwgG0LKxr2n/VB1BwReAw4Q=; h=From:To:Cc:Subject:Date:From; b=x3r7j53J5cZsTE6h/RXCiUmM8CWRF0ThoawZr8jEvbLekjkvsBps08ODC90hTJPSw /a/AOWrGIv4LpZ0xxKkU8ym7d/lEQUJOobJjGo3JPPWBxhNqCEnC+V2NGDL1DjnK3f WHYHBoHrzp876TV02gRwqB4Uhlx14ETJeJ5EWE0Fmb+Z0SVwWIC2VTwektwNMLmK/f m7n9GybpmzloiikJHU25AeqKvPvOBa10BueDcznS22R9UXGUDEdHXg2/Hofg8v2aUY cbqTSqQsGRSo3GsRslYhgvJkyM3zA75q+T8pI/apZ/0Vh/MrNtI3pH/XbhKqqt2cp5 hGvsSxUvVSj7w== To: netdev@vger.kernel.org Cc: cake@lists.bufferbloat.net, =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Mon, 16 Jul 2018 16:45:09 +0200 Message-Id: <20180716144509.31121-1-toke@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Cake] [PATCH net-next] sch_cake: Fix tin order when set through skb->priority X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 14:46:01 -0000 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: 83f8fd69af4f ("sch_cake: Add DiffServ handling") Signed-off-by: Toke Høiland-Jørgensen --- net/sched/sch_cake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index 30695691e9ff..539c9490c308 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -1546,7 +1546,7 @@ static struct cake_tin_data *cake_select_tin(struct Qdisc *sch, if (TC_H_MAJ(skb->priority) == sch->handle && TC_H_MIN(skb->priority) > 0 && 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) cake_wash_diffserv(skb); -- 2.18.0