netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 1/2] vxlan: remove vxlan_group_used in vxlan_open
@ 2013-12-10  8:37 Gao feng
  2013-12-10  8:37 ` [PATCH v2 net-next 2/2] vxlan: leave multicast group when vxlan device down Gao feng
  2013-12-11 19:21 ` [PATCH v2 net-next 1/2] vxlan: remove vxlan_group_used in vxlan_open David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Gao feng @ 2013-12-10  8:37 UTC (permalink / raw)
  To: netdev; +Cc: stephen, davem, Gao feng

In vxlan_open, vxlan_group_used always returns true,
because the state of the vxlan deivces which we want
to open has alreay been running. and it has already
in vxlan_list.

Since ip_mc_join_group takes care of the reference
of struct ip_mc_list. removing vxlan_group_used here
is safe.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
Change from v1:
 remove unused var vn.
 change changelog, remove the confused "reference problem".

 drivers/net/vxlan.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 0358c07..43dc9ee 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1935,7 +1935,6 @@ static void vxlan_uninit(struct net_device *dev)
 /* Start ageing timer and join group when device is brought up */
 static int vxlan_open(struct net_device *dev)
 {
-	struct vxlan_net *vn = net_generic(dev_net(dev), vxlan_net_id);
 	struct vxlan_dev *vxlan = netdev_priv(dev);
 	struct vxlan_sock *vs = vxlan->vn_sock;
 
@@ -1943,8 +1942,7 @@ static int vxlan_open(struct net_device *dev)
 	if (!vs)
 		return -ENOTCONN;
 
-	if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip) &&
-	    vxlan_group_used(vn, &vxlan->default_dst.remote_ip)) {
+	if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip)) {
 		vxlan_sock_hold(vs);
 		dev_hold(dev);
 		queue_work(vxlan_wq, &vxlan->igmp_join);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-11 19:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10  8:37 [PATCH v2 net-next 1/2] vxlan: remove vxlan_group_used in vxlan_open Gao feng
2013-12-10  8:37 ` [PATCH v2 net-next 2/2] vxlan: leave multicast group when vxlan device down Gao feng
2013-12-11 19:21   ` David Miller
2013-12-11 19:21 ` [PATCH v2 net-next 1/2] vxlan: remove vxlan_group_used in vxlan_open David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).