All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down
@ 2017-01-21  7:40 Roopa Prabhu
  2017-01-21  7:40 ` [PATCH cumulus-4.1.y 2/5] vxlan: don't replace fdb entry if nothing changed Roopa Prabhu
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Roopa Prabhu @ 2017-01-21  7:40 UTC (permalink / raw)
  To: davem; +Cc: netdev, ramanb, stephen, jbenc, pshelar

From: Balakrishnan Raman <ramanb@cumulusnetworks.com>

Flush fdb entries of a vxlan device when its state
changes to oper down. vxlan_stop handles flush on
admin down.

Signed-off-by: Balakrishnan Raman <ramanb@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 drivers/net/vxlan.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 19b1653..15b1c23 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3276,6 +3276,12 @@ static int vxlan_netdevice_event(struct notifier_block *unused,
 		vxlan_handle_lowerdev_unregister(vn, dev);
 	else if (event == NETDEV_UDP_TUNNEL_PUSH_INFO)
 		vxlan_push_rx_ports(dev);
+	else if (event == NETDEV_CHANGE) {
+		if (dev->netdev_ops == &vxlan_netdev_ops) {
+			if (netif_running(dev) && !netif_oper_up(dev))
+				vxlan_flush(netdev_priv(dev));
+		}
+	}
 
 	return NOTIFY_DONE;
 }
-- 
1.9.1

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

end of thread, other threads:[~2017-01-24  0:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-21  7:40 [PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down Roopa Prabhu
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 2/5] vxlan: don't replace fdb entry if nothing changed Roopa Prabhu
2017-01-23 17:02   ` Stephen Hemminger
2017-01-24  0:14     ` Roopa Prabhu
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 3/5] vxlan: enforce precedence for static over dynamic fdb entry Roopa Prabhu
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 4/5] vxlan: don't flush static fdb entries on admin down Roopa Prabhu
2017-01-21  9:25   ` kbuild test robot
2017-01-21  7:40 ` [PATCH cumulus-4.1.y 5/5] vxlan: do not age static remote mac entries Roopa Prabhu
2017-01-21  7:41 ` [PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down Roopa Prabhu
2017-01-21  8:54 ` kbuild test robot
2017-01-21  8:58 ` kbuild test robot
2017-01-23 16:59 ` Stephen Hemminger
2017-01-24  0:11   ` Roopa Prabhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.