All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jiri Pirko <jiri@mellanox.com>
Cc: "Linux Kernel Network Developers" <netdev@vger.kernel.org>,
	"Paweł Staszewski" <pstaszewski@itcare.pl>
Subject: Fwd: u32 ht filters
Date: Tue, 6 Feb 2018 21:09:15 -0800	[thread overview]
Message-ID: <CAM_iQpX_CG9casEeFiXtnBNUg15ZWrdskp3JbFnXd=zXBeb7cg@mail.gmail.com> (raw)
In-Reply-To: <9c8f997d-339c-5088-0bb5-124e9f55f02d@itcare.pl>

Hi, Jiri

Your  commit 7fa9d974f3c2a016b9accb18f4ee2ed2a738585c
breaks the tc script by Paweł. Please find below for details.


commit 7fa9d974f3c2a016b9accb18f4ee2ed2a738585c
Author: Jiri Pirko <jiri@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 <jiri@mellanox.com>
    Signed-off-by: David S. Miller <davem@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 <pstaszewski@itcare.pl>
Date: Tue, Feb 6, 2018 at 8:05 AM
Subject: u32 ht filters
To: Cong Wang <xiyou.wangcong@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

       reply	other threads:[~2018-02-07  5:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9c8f997d-339c-5088-0bb5-124e9f55f02d@itcare.pl>
2018-02-07  5:09 ` Cong Wang [this message]
2018-02-07  7:01   ` Fwd: u32 ht filters Jiri Pirko
2018-02-07 23:08     ` Cong Wang
2018-02-08  7:38       ` Jiri Pirko
2018-02-10 20:41         ` Cong Wang
2018-02-12 13:23           ` Jiri Pirko
2018-02-12 15:32           ` Jiri Pirko
2018-02-12 15:51             ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM_iQpX_CG9casEeFiXtnBNUg15ZWrdskp3JbFnXd=zXBeb7cg@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=pstaszewski@itcare.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.