From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Fwd: u32 ht filters Date: Tue, 6 Feb 2018 21:09:15 -0800 Message-ID: References: <9c8f997d-339c-5088-0bb5-124e9f55f02d@itcare.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: Linux Kernel Network Developers , =?UTF-8?Q?Pawe=C5=82_Staszewski?= To: Jiri Pirko Return-path: Received: from mail-pl0-f44.google.com ([209.85.160.44]:35533 "EHLO mail-pl0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbeBGFJg (ORCPT ); Wed, 7 Feb 2018 00:09:36 -0500 Received: by mail-pl0-f44.google.com with SMTP id j19so2803485pll.2 for ; Tue, 06 Feb 2018 21:09:36 -0800 (PST) In-Reply-To: <9c8f997d-339c-5088-0bb5-124e9f55f02d@itcare.pl> Sender: netdev-owner@vger.kernel.org List-ID: Hi, Jiri Your commit 7fa9d974f3c2a016b9accb18f4ee2ed2a738585c breaks the tc script by Pawe=C5=82. Please find below for details. 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=C5=82 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 5000= Mbit 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 51200k= bit 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=C5=82 Staszewski