Skip to contentSkip to conversation

macvlan: Change status when lower device goes down

PATCH In review Travis Brown 2 participants 2 messages Jul 10, 2018 – Jul 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 macvlan: Change status when lower device goes down

Today macvlan ignores the notification when a lower device goes administratively down, preventing the lack of connectivity from bubbling up.

Processing NETDEV_DOWN results in a macvlan state of LOWERLAYERDOWN with NO-CARRIER which should be easy to interpret in userspace.

2: lower: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
3: macvlan@lower: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000

---
 drivers/net/macvlan.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/macvlan.c +1 -0
index adde8fc45588..6dcd715a9370 100644
@@ -1647,6 +1647,7 @@ static int macvlan_device_event(struct notifier_block *unused,
 
 	switch (event) {
 	case NETDEV_UP:
+	case NETDEV_DOWN:
 	case NETDEV_CHANGE:
 		list_for_each_entry(vlan, &port->vlans, list)
 			netif_stacked_transfer_operstate(vlan->lowerdev,
Signature · 1 line
2.16.1
maintainer
#1 lore raw

From: Travis Brown <[email protected]>
Date: Tue, 10 Jul 2018 00:35:01 +0000

Quoted 4 lines

Today macvlan ignores the notification when a lower device goes administratively down, preventing the lack of connectivity from bubbling up.

Quoted 8 lines

Processing NETDEV_DOWN results in a macvlan state of LOWERLAYERDOWN with NO-CARRIER which should be easy to interpret in userspace.

2: lower: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
3: macvlan@lower: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000

Seems reasonable, applied, thanks.