From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jhs@mojatatu.com,
tgraf@suug.ch, jesse@nicira.com
Subject: Re: [patch net-next] tc: introduce OpenFlow classifier
Date: Thu, 26 Mar 2015 21:39:11 +0100 [thread overview]
Message-ID: <1427402351.2093330.245738573.1406B9EA@webmail.messagingengine.com> (raw)
In-Reply-To: <20150326152938.GD2010@nanopsycho.orion>
On Thu, Mar 26, 2015, at 16:29, Jiri Pirko wrote:
> Thu, Mar 26, 2015 at 03:23:56PM CET, hannes@stressinduktion.org wrote:
> >> +static int of_classify(struct sk_buff *skb, const struct tcf_proto *tp,
> >> + struct tcf_result *res)
> >> +{
> >> + struct cls_of_head *head = rcu_dereference_bh(tp->root);
> >> + struct cls_of_filter *f;
> >> + struct of_flow_key skb_key;
> >> + int ret;
> >> +
> >> + of_extract_key(skb, &skb_key);
> >> +
> >> + list_for_each_entry_rcu(f, &head->filters, list) {
> >> + if (!of_match(&skb_key, f))
> >> + continue;
> >
> >This seems very limited to me, do you have plans to extend this?
>
> What do you have in mind?
We have the possibility to make the order of the matches matter easily
here (like a decision tree).
Maybe this would give a benefit over simple full match with mask, so
user space can align the most
significant matches first thus creating less churn in the caches and
make the lookup time shorter?
I understand, if you want build a simples openvswitch replacement a hash
table would be good to go,
too.
Just a proposal, maybe we can add more benefit to this kind of
classifier.
Albeit it looks a bit like cls_bpf could do that more easily.
What do you think?
Bye,
Hannes
next prev parent reply other threads:[~2015-03-26 20:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 12:53 [patch net-next] tc: introduce OpenFlow classifier Jiri Pirko
2015-03-26 12:55 ` [patch iproute2/net-next] tc: add support for " Jiri Pirko
2015-03-26 13:25 ` [patch net-next] tc: introduce " Thomas Graf
2015-03-26 14:22 ` Jiri Pirko
2015-03-26 14:23 ` Hannes Frederic Sowa
2015-03-26 15:29 ` Jiri Pirko
2015-03-26 20:39 ` Hannes Frederic Sowa [this message]
2015-03-26 20:51 ` Daniel Borkmann
2015-03-27 6:07 ` Jiri Pirko
2015-03-27 11:44 ` Thomas Graf
2015-03-27 12:28 ` Jiri Pirko
2015-03-27 12:36 ` Thomas Graf
2015-03-27 12:45 ` Jiri Pirko
2015-03-27 12:49 ` Thomas Graf
2015-03-30 0:45 ` Jamal Hadi Salim
2015-03-30 0:39 ` Jamal Hadi Salim
2015-03-30 6:26 ` Jiri Pirko
2015-03-30 11:10 ` Jamal Hadi Salim
2015-03-30 12:18 ` 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=1427402351.2093330.245738573.1406B9EA@webmail.messagingengine.com \
--to=hannes@stressinduktion.org \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).