[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150410114633.GB2021@nanopsycho.orion>
Date: Fri, 10 Apr 2015 13:46:33 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
jhs@...atatu.com, tgraf@...g.ch, jesse@...ira.com
Subject: Re: [patch net-next v3] tc: introduce OpenFlow classifier
Fri, Apr 10, 2015 at 11:30:06AM CEST, daniel@...earbox.net wrote:
>On 04/10/2015 11:12 AM, Jiri Pirko wrote:
>...
>>>However I am sure that I majorly object to having yet another flow
>>>parsing engine. Therefore, at least adjust this code to use our flow
>>>dissector and datastructures. Adjust the flow dissector to fit your
>>>needs, if necessary.
>>
>>Yep, Thomas already suggested the merge. The thing is, cls_flow uses
>>linked list for doing lookups. That is not scalable. in cls_openflow I
>>use rhashtable. Using rhashtable in cls_flow would break the existing
>>assumption that first inrested filter would be first hit.
>>
>>So that would lead into major dual code in cls_flow. So I believe that
>>it is better to do it in separate cls_openflow (do one thing and do it
>>right).
>
>Would it be possible to 1) reuse the majority of the existing internal
>cls_flow code as much as possible, integrate the remaining openflow
>parts into it, and then 2) just register a 2nd classifier kind, a la ...
>
>static struct tcf_proto_ops cls_flow_ht_ops __read_mostly = {
> .kind = "flow-ht",
> .classify = flow_classify_ht,
> .init = flow_init,
> .destroy = flow_destroy,
> .change = flow_change,
> .delete = flow_delete,
> .get = flow_get,
> .dump = flow_dump,
> .walk = flow_walk,
> .owner = THIS_MODULE,
>};
>
>... so you could do the non-linear rhashtable matching from there, but
>without much duplication?
I might be missing something, but to me, the codes of cls_flow and
cls_openflow are very different. Merging cls_openflow with for example
cls_fw makes similar sense to me.
cls_flow is no match-action classifier. All skbs are hashed into classid
of pre-defined range. You cannot speficy explicit action for match.
On the other hand cls_openflow is match-action classifier (similar to
for example bpf - might make more sense to me to merge it with bpf).
What I say is, lets do things clearly, separate, not "overmerge" stuff.
I will definitelly loose name "openflow" for my future submission to not
to confuse people.
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists