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 B47D93BA8E for ; Wed, 30 May 2018 15:58:22 -0400 (EDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1527710299; bh=xTPzlIPMjyEO7vz96zDqyXhe1C4YUf4EdfhQTlq8akU=; h=From:To:Subject:In-Reply-To:References:Date:From; b=GGfTtQqIedM4r6oQ1BD3/Q9MSyh4GeY4epV6zhVTlGNnbJbbF395LNR3Nb1qDjExe 3SJeMn91kX4oUrVaD89K752QQxVCQ80z8MqoARGjRRw2pr74ZITw8mUJRydI7yAgp9 eEtgdmkr4VCfPcdckC6dMcwlJ+OW0AURC9tetxWzoiW/SNP5X5ne58dc1orLyN2A0M lx3KeIrCRtnW5XLkkKSZ88+J+zJVR31Yli5ptaK54smTpUSAOGf6JS1Lues/QmpPgp LyMiY9cgYRcOVkrs2B01kFOS4RvskhFdhv+d3qUcYpzwLsVxBVlxB5pHonuoabXq+E ngWNquIqAU9Rw== To: Georgios Amanakis , Cake List In-Reply-To: References: <87muwyy34k.fsf@toke.dk> Date: Wed, 30 May 2018 21:58:22 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87tvqoc3vl.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Cake] Does the latest cake support "tc filter"? 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: Wed, 30 May 2018 19:58:22 -0000 Georgios Amanakis writes: >> Yes, the version submitted to upstream supports this. You can override >> which tin packets goes in by setting skb->priority from a filter or >> application (the major number needs to be set to the qdisc ID, and the >> minor number becomes the tin to queue packets in). > > Toke could you give an example how to do this? > > I am trying to put all traffic into tin 0: > #tc qdisc add dev enp1s0 root handle 8001 cake diffserv3 bandwidth 2mbit > #tc filter add dev enp1s0 parent 8001: protocol all \ > u32 match u32 0 0 \ > action skbedit priority 8001:1 > > However as soon as the second command is executed all traffic drops, > and it only resumes once I remove the filter. > > What am I doing wrong? Hmm, nothing apart from using the classifiers in an unexpected (by me) way ;) Basically, what is happening is that the skbedit filter doesn't do classification. In which case Cake will cheerfully drop the packet. I just pushed a change to the upstream-4.18 branch which reworks the filter classification so it'll still hash packets if the filter doesn't make a decision, and also moves the tin selection to after the filter has run, to give priority selection a chance to work (even if the packets had not been dropped, you wouldn't have gotten the result you wanted, since the skb->priority field was checked before the filters we run...) Please see if that works better :) -Toke