From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org
Cc: davem@davemloft.net, tgraf@suug.ch, jesse@nicira.com
Subject: Re: [patch net-next] tc: introduce OpenFlow classifier
Date: Sun, 29 Mar 2015 20:39:31 -0400 [thread overview]
Message-ID: <55189B43.6000407@mojatatu.com> (raw)
In-Reply-To: <1427374439-11587-1-git-send-email-jiri@resnulli.us>
Jiri,
Comments below
On 03/26/15 08:53, Jiri Pirko wrote:
> This patch introduces OpenFlow-based filter. So far, the very essential
> packet fields are supported (according to OpenFlow v1.4 spec).
>
> This patch is only the first step. There is a lot of potential performance
> improvements possible to implement. Also a lot of features are missing
> now. They will be addressed in follow-up patches.
>
> To the name of this classifier, I believe that "cls_openflow" is pretty
> accurate. It is actually a OpenFlow classifier.
>
I agree with your statement above.
Small comments below:
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
> +struct of_flow_key {
> + int indev_ifindex;
> + struct {
> + u8 src[ETH_ALEN];
> + u8 dst[ETH_ALEN];
> + __be16 type;
> + } eth;
Could you have got rid of "type" above given we always have
a "proto" field in tc that is checked at the core?
> + struct {
> + u8 proto;
> + } ip;
> + union {
> + struct {
> + __be32 src;
> + __be32 dst;
> + } ipv4;
> + struct {
> + struct in6_addr src;
> + struct in6_addr dst;
> + } ipv6;
> + };
> + union {
> + struct {
> + __be16 src;
> + __be16 dst;
> + } tp;
> + };
Was there something else that was intended to go into that tp union?
> +static int of_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
> + struct sk_buff *skb, struct tcmsg *t)
> +{
> + struct cls_of_filter *f = (struct cls_of_filter *) fh;
> + struct nlattr *nest;
> + struct of_flow_key *key, *mask;
> +
> + if (!f)
> + return skb->len;
> +
> + t->tcm_handle = f->handle;
> +
> + nest = nla_nest_start(skb, TCA_OPTIONS);
> + if (!nest)
> + goto nla_put_failure;
> +
> + if (f->res.classid &&
> + nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid))
> + goto nla_put_failure;
I am sure you didnt meant the above;->
Other than that looks good. I dont mind saying
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
General comments:
so what happens if someone adds a new field? It sounds to me like
given it is tied to datapath match it will never be backward compatible
(i.e think old tc, new kernel vs new tc, old kernel)
cheers,
jamal
next prev parent reply other threads:[~2015-03-30 0: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
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 [this message]
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=55189B43.6000407@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=davem@davemloft.net \
--cc=jesse@nicira.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 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.