Subject: Re: [patch net-next v4 00/10] net: sched: allow qdiscs to share filter block instances

From: Jiri Pirko <[email-masked]>
Date: Thu, 4 Jan 2018 14:05:06 +0100

Thu, Jan 04, 2018 at 01:55:05PM CET, [email-masked] wrote:
>
>On the egress issue and sharing.
>
>Let me provide a simple example to illustrate.
>
>tc qdisc add dev enps7 root handle 1: prio block 1
>
>Creates 3 classes
>
>$ tc class ls dev enps7
>  class prio 1:1 parent 1:
>  class prio 1:2 parent 1:
>  class prio 1:3 parent 1:
>
>tc qdisc add dev enps8 root handle 10: prio block 1
>
>Creates 3 classes
>
>$ tc class ls dev enps8
>  class prio 10:1 parent 10:
>  class prio 10:2 parent 10:
>  class prio 10:3 parent 10:
>
>So now i add filters, today I can do:
>
>tc filter add dev enps7 parent 1:0 protocol ip priority 10 flower ...
>classid 1:2
>
>I could also have added this via the new block interface i.e
>
>$ tc filter add block 1 protocol ip priority 10 flower ...
>classid 1:2
>
>Looks good - things will work fine for packets showing
>up on egress of enps7 which match the flower rule
>and classid 1:2 is selected to queue the packet on.
>
>Things will not _work fine_ for packets showing up on
>egress of ensp8. There is no classid 1:2 on egress of
>enps8. The prio qdisc is a bad example because it
>has a default queue (i think 10:2) in this case. Other
>qdiscs(off top of my head DRR) will just drop the packet.

I'm very well aware of this. The plan is to support this and resolve
the lack of classid withing the qdisc according to the qdisc type.
However, currently the classfull qdiscs are not supported for
block sharing - only ingress and clsact qdiscs are supported.

>
>I think this is resolvable - but it will take more to the
>patches than the current set you posted Jiri.
>A simple solution is to say sharing only works for ingress
>(but that sounds very lame).

That is the current limitation of the patchset as you can see. The
sharing works only for ingress and clsact qdisc. So works for both
ingress and egress (clsact).

>cheers,
>jamal