[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150108174151.GE1898@nanopsycho.orion>
Date: Thu, 8 Jan 2015 18:41:51 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: John Fastabend <john.fastabend@...il.com>
Cc: tgraf@...g.ch, sfeldma@...il.com, jhs@...atatu.com,
simon.horman@...ronome.com, netdev@...r.kernel.org,
davem@...emloft.net, andy@...yhouse.net
Subject: Re: [net-next PATCH v1 03/11] net: flow_table: add apply action
argument to tables
Wed, Dec 31, 2014 at 08:46:44PM CET, john.fastabend@...il.com wrote:
>Actions may not always be applied after exiting a table. For example
>some pipelines may accumulate actions and then apply them at the end
>of a pipeline.
>
>To model this we use a table type called APPLY. Tables who share an
>apply identifier have their actions applied in one step.
Why this is a separate patch? Perhaps this can be squashed to one of the
previous ones?
>
>Signed-off-by: John Fastabend <john.r.fastabend@...el.com>
>---
> include/linux/if_flow.h | 1 +
> include/uapi/linux/if_flow.h | 1 +
> net/core/flow_table.c | 1 +
> 3 files changed, 3 insertions(+)
>
>diff --git a/include/linux/if_flow.h b/include/linux/if_flow.h
>index 20fa752..a042a3d 100644
>--- a/include/linux/if_flow.h
>+++ b/include/linux/if_flow.h
>@@ -67,6 +67,7 @@ struct net_flow_table {
> char name[NET_FLOW_NAMSIZ];
> int uid;
> int source;
>+ int apply_action;
> int size;
> struct net_flow_field_ref *matches;
> int *actions;
>diff --git a/include/uapi/linux/if_flow.h b/include/uapi/linux/if_flow.h
>index 125cdc6..3c1a860 100644
>--- a/include/uapi/linux/if_flow.h
>+++ b/include/uapi/linux/if_flow.h
>@@ -265,6 +265,7 @@ enum {
> NET_FLOW_TABLE_ATTR_NAME,
> NET_FLOW_TABLE_ATTR_UID,
> NET_FLOW_TABLE_ATTR_SOURCE,
>+ NET_FLOW_TABLE_ATTR_APPLY,
> NET_FLOW_TABLE_ATTR_SIZE,
> NET_FLOW_TABLE_ATTR_MATCHES,
> NET_FLOW_TABLE_ATTR_ACTIONS,
>diff --git a/net/core/flow_table.c b/net/core/flow_table.c
>index f4cf293..97cdf92 100644
>--- a/net/core/flow_table.c
>+++ b/net/core/flow_table.c
>@@ -223,6 +223,7 @@ static int net_flow_put_table(struct net_device *dev,
> if (nla_put_string(skb, NET_FLOW_TABLE_ATTR_NAME, t->name) ||
> nla_put_u32(skb, NET_FLOW_TABLE_ATTR_UID, t->uid) ||
> nla_put_u32(skb, NET_FLOW_TABLE_ATTR_SOURCE, t->source) ||
>+ nla_put_u32(skb, NET_FLOW_TABLE_ATTR_APPLY, t->apply_action) ||
> nla_put_u32(skb, NET_FLOW_TABLE_ATTR_SIZE, t->size))
> return -EMSGSIZE;
>
>
--
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