Wed, Feb 07, 2018 at 06:09:15AM CET, xiyou.wangc...@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 <j...@mellanox.com> >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 <j...@mellanox.com> > Signed-off-by: David S. Miller <da...@davemloft.net> > >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 <pstaszew...@itcare.pl> >Date: Tue, Feb 6, 2018 at 8:05 AM >Subject: u32 ht filters >To: Cong Wang <xiyou.wangc...@gmail.com> > > >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