From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: Fwd: u32 ht filters Date: Wed, 7 Feb 2018 08:01:48 +0100 Message-ID: <20180207070148.GA2149@nanopsycho.orion> References: <9c8f997d-339c-5088-0bb5-124e9f55f02d@itcare.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Jiri Pirko , Linux Kernel Network Developers , =?utf-8?B?UGF3ZcWC?= Staszewski To: Cong Wang Return-path: Received: from mail-wr0-f169.google.com ([209.85.128.169]:36346 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753468AbeBGHBu (ORCPT ); Wed, 7 Feb 2018 02:01:50 -0500 Received: by mail-wr0-f169.google.com with SMTP id y3so4478359wrh.3 for ; Tue, 06 Feb 2018 23:01:50 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Wed, Feb 07, 2018 at 06:09:15AM CET, xiyou.wangcong@gmail.com wrote: >Hi, Jiri > >Your commit 7fa9d974f3c2a016b9accb18f4ee2ed2a738585c >breaks the tc script by Paweł. Please find below for details. Did you do the bisection? The commit just uses block struct instead of q, but since they are in 1:1 relation, that should be equvivalent. So basically you still have per-qdisc hashtables for u32. > > >commit 7fa9d974f3c2a016b9accb18f4ee2ed2a738585c >Author: Jiri Pirko >Date: Fri Oct 13 14:01:02 2017 +0200 > > net: sched: cls_u32: use block instead of q in tc_u_common > > tc_u_common is now per-q. With blocks, it has to be converted to be > per-block. > > Signed-off-by: Jiri Pirko > Signed-off-by: David S. Miller > >Before this commit, u32 hashtables are per-qdisc, after this commit >it becomes per-block or per-class... this is why the script below is broken. > > >---------- Forwarded message ---------- >From: Paweł Staszewski >Date: Tue, Feb 6, 2018 at 8:05 AM >Subject: u32 ht filters >To: Cong Wang > > >Hi > > >Is there something changed in kernek 4.15 that makes problem with old >configuration of tc filters with hashing filters ? > >for example this : > >tc qdisc del root dev ifb1 > >tc qdisc add dev ifb1 root handle 1:0 hfsc default 8000 >tc filter add dev ifb1 parent 1:0 protocol ip u32 >tc class add dev ifb1 parent 1:0 classid 1:1 hfsc ls m2 10000Mbit ul >m2 10000Mbit >tc class add dev ifb1 parent 1:1 classid 1:2 hfsc ls m2 10000Mbit ul >m2 10000Mbit >tc class add dev ifb1 parent 1:1 classid 1:3 hfsc ls m2 5000Mbit ul m2 5000Mbit >tc class add dev ifb1 parent 1:2 classid 1:8000 hfsc ls m2 10000Mbit >ul m2 10000Mbit >tc qdisc add dev ifb1 parent 1:8000 handle 8000: sfq perturb 60 >tc qdisc add dev ifb1 parent 1:3 handle 3: pfifo limit 10000 > > >tc filter add dev ifb1 protocol ip parent 1:0 handle 9: u32 divisor 256 >tc filter add dev ifb1 protocol ip parent 1:0 u32 ht 800:: match ip >dst 192.168.0.0/24 hashkey mask 0x000000ff at 16 link 9: >tc class add dev ifb1 parent 1:2 classid 1:60 hfsc ls m2 8kbit ul m2 51200kbit >echo 1 >tc filter add dev ifb1 parent 1:2 protocol ip u32 ht 9:22 match ip dst >192.168.0.34 flowid 1:60 >echo 2 >tc qdisc add dev ifb1 parent 1:60 handle 60: pfifo limit 8192 > > >Is working with 4.13 > > >But it is not working with 4.15 > >error is when adding: > >tc filter add dev ifb1 protocol ip parent 1:2 prio 4 u32 ht 9:0x22 >match ip dst 192.168.0.34 flowid 1:60 >RTNETLINK answers: Invalid argument >We have an error talking to the kernel > > > > >Thanks > >Paweł Staszewski