On Tue, Aug 20, 2013 at 2:31 PM, Pravin B Shelar <[email protected]> wrote:
> Upstream vxlan implementation was changed according to few
> comments. Following patch brings back those changes to out
> of tree ovs module.
>
> Signed-off-by: Pravin B Shelar <[email protected]>
A couple minor things that I noticed:
> diff --git a/datapath/linux/compat/include/net/vxlan.h
> b/datapath/linux/compat/include/net/vxlan.h
> index 102bc0c..5fc8d54 100644
> --- a/datapath/linux/compat/include/net/vxlan.h
> +++ b/datapath/linux/compat/include/net/vxlan.h
> +#define VNI_HASH_BITS 10
> +#define VNI_HASH_SIZE (1<<VNI_HASH_BITS)
I don't think any of the VNI hash stuff ever gets used - it wasn't
clear to me how close you were trying to stay to the upstream code
even for pieces that don't apply.
> diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
> index f3df4e3..6972aac 100644
> --- a/datapath/linux/compat/vxlan.c
> +++ b/datapath/linux/compat/vxlan.c
> @@ -101,10 +104,20 @@ static struct vxlan_sock *vxlan_find_port(struct net
> *net, __be16 port)
> return NULL;
> }
>
> +static struct vxlan_sock *vxlan_find_sock(struct net *net, __be16 port)
> +{
> + struct vxlan_sock *vs;
> +
> + hlist_for_each_entry_rcu(vs, vs_head(net, port), hlist) {
> + if (inet_sport(vs->sock->sk) == port)
> + return vs;
> + }
> + return NULL;
> +}
We now have two copies of an identical function - vlan_find_sock() and
vxlan_find_port(). The upstream code only has the former, so I think
we can just remove the latter.
> diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
> index f3ef947..0a88966 100644
> --- a/datapath/vport-vxlan.c
> +++ b/datapath/vport-vxlan.c
> @@ -1,6 +1,6 @@
> /*
> - * Copyright (c) 2011 Nicira, Inc.
> - * Copyright (c) 2012 Cisco Systems, Inc.
> + * Copyright (c) 2013 Nicira, Inc.
> + * Copyright (c) 2011 Cisco Systems, Inc.
The most minor of all - isn't the Cisco copyright year 2013 upstream?
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev