On Fri, Sep 6, 2013 at 1:28 PM, Pravin B Shelar <pshe...@nicira.com> wrote:
> Rather than rehashing flow table in a workqueue, we can safely
> do it at flow install.  This simplify ovs locking and reduces
> dependence on workqueue.
>
> Signed-off-by: Pravin B Shelar <pshe...@nicira.com>

It might also be good to add a comment about the possibility of the
workqueue being blocked during periods of high flow setups.

> diff --git a/datapath/datapath.c b/datapath/datapath.c
> index bb1e282..d342d2e 100644
> --- a/datapath/datapath.c
> +++ b/datapath/datapath.c
> @@ -1291,22 +1289,25 @@ static int ovs_flow_cmd_new_or_set(struct sk_buff 
> *skb, struct genl_info *info)
>         /* Check if this is a duplicate flow */
>         flow = ovs_flow_lookup(table, &key);
>         if (!flow) {
> +               struct flow_table *new_table = ERR_PTR(-ENOMEM);

Using -ENOMEM seems a little misleading to me, maybe we could just set
it to NULL and then check for that as well below?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to