Subject: Re: [RFC 2/3] tc: deprecate TC_ACT_QUEUED

From: Daniel Borkmann <[email-masked]>
Date: Fri, 24 Apr 2015 10:12:57 +0200

On 04/24/2015 05:37 AM, Cong Wang wrote:
> On Thu, Apr 23, 2015 at 5:59 PM, Alexei Starovoitov <[email-masked]> wrote:
>> On 4/23/15 3:51 PM, Jamal Hadi Salim wrote:
...
>> agree. imo ifb approach is more flexible, since it has full hierarchy
>> of qdiscs. As you're saying above and from the old ifb logs I thought
>> that ifb is _temporary_ and long term plan is to use ingress_queue,
>> but looks like this is not the case. Also not too long ago we decided
>> that we don't want another ingress qdisc. Therefore I think it makes
>> sense to simplify the code and boost performance.
>
> Which performance problem did you see? Did you hit the spinlock
> bottleneck? That spinlock should be eliminated before you
> try to do more  [...]

Those are already the next steps for improving performance after
that, by attempting to get rid of these additional indirections
and shrinking code.

>> I'm not proposing to change tooling, of course.
>>  From iproute2 point of view we'll still have ingress qdisc.
>> Right now we're pointlessly allocating memory for it and for
>> ingress_queue, whereas we only need to call cls/act.
>> I'm proposing to kill them and used tcf_proto in net_device instead.
>> Right now to reach cls in critical path on ingress we do:
>> rxq = skb->dev->ingress_queue
>> sch = rxq->qdisc
>> sch->enqueue
>> sch->filter_list
>> with a bunch of 'if' conditions and useless memory accesses in-between.
>> If we add 'ingress_filter_list' directly to net_device,
>> it will be just:
>> skb->dev->ingress_filter_list
>> which is huge performance boost. Code size will shrink as well.
>> iproute2 and all existing tools will work as-is. Looks as win-win to me.
>
> Nope, it breaks Qdisc abstraction, filters never attach to netdevice
> directly. You should stop, since you really don't understand the code.

Would be great if you make netdev a better place, stop such immature
comments, and keep it technical as everyone else.

The point here is to try thinking outside the box, so lets see how
the result in the end looks like, then we can discuss.