On Fri, Sep 30, 2011 at 10:07 AM, Pravin Shelar <pshe...@nicira.com> wrote:
> diff --git a/datapath/tunnel.c b/datapath/tunnel.c
> index 67fbd2b..730b5b9 100644
> --- a/datapath/tunnel.c
> +++ b/datapath/tunnel.c
> @@ -74,6 +74,8 @@
>  static struct hlist_head *port_table __read_mostly;
>  static int port_table_count;
>
> +static unsigned int hash_seed __read_mostly;

There's actually no need for a hash seed here because the hash table
entries are not controlled by an untrusted third party.  This is in
contrast to the flow table, which is populated based on the traffic
that we see and could therefore be made to be unbalanced by an
attacker.

> @@ -330,7 +303,6 @@ struct vport *tnl_find_port(__be32 saddr, __be32 daddr, 
> __be64 key,
>        return NULL;
>
>  found:
> -       *mutable = lookup.mutable;
>        return tnl_vport_to_vport(tnl_vport);

It's probably cleaner to just return from the various searches
directly, instead of this jump now that there's only one statement.

Otherwise, looks good:
Acked-by: Jesse Gross <je...@nicira.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to