netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Travis Brown <travisb@arista.com>
To: netdev@vger.kernel.org
Cc: Travis Brown <travisb@arista.com>,
	Suresh Krishnan <skrishnan@arista.com>
Subject: [PATCH net-next] macvlan: Change status when lower device goes down
Date: Tue, 10 Jul 2018 00:35:01 +0000	[thread overview]
Message-ID: <20180710003501.13971-1-travisb@arista.com> (raw)

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

             reply	other threads:[~2018-07-10  0:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10  0:35 Travis Brown [this message]
2018-07-12  6:07 ` [PATCH net-next] macvlan: Change status when lower device goes down David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180710003501.13971-1-travisb@arista.com \
    --to=travisb@arista.com \
    --cc=netdev@vger.kernel.org \
    --cc=skrishnan@arista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).