All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] macvlan: Change status when lower device goes down
@ 2018-07-10  0:35 Travis Brown
  2018-07-12  6:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Travis Brown @ 2018-07-10  0:35 UTC (permalink / raw)
  To: netdev; +Cc: Travis Brown, Suresh Krishnan

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

Signed-off-by: Suresh Krishnan <skrishnan@arista.com>
Signed-off-by: Travis Brown <travisb@arista.com>
---
 drivers/net/macvlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index adde8fc45588..6dcd715a9370 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -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,
-- 
2.16.1

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

* Re: [PATCH net-next] macvlan: Change status when lower device goes down
  2018-07-10  0:35 [PATCH net-next] macvlan: Change status when lower device goes down Travis Brown
@ 2018-07-12  6:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-12  6:07 UTC (permalink / raw)
  To: travisb; +Cc: netdev, skrishnan

From: Travis Brown <travisb@arista.com>
Date: Tue, 10 Jul 2018 00:35:01 +0000

> 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
> 
> Signed-off-by: Suresh Krishnan <skrishnan@arista.com>
> Signed-off-by: Travis Brown <travisb@arista.com>

Seems reasonable, applied, thanks.

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

end of thread, other threads:[~2018-07-12  6:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-10  0:35 [PATCH net-next] macvlan: Change status when lower device goes down Travis Brown
2018-07-12  6:07 ` David Miller

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.