public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eldad Zack <eldad@fogrefinery.com>
To: David Miller <davem@davemloft.net>
Cc: kaber@trash.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 8021q/vlan: process NETDEV_GOING_DOWN
Date: Wed, 30 May 2012 21:11:02 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1205302055140.1587@debianer> (raw)
In-Reply-To: <20120529.204040.644013889059321702.davem@davemloft.net>


On Tue, 29 May 2012, David Miller wrote:
> From: Eldad Zack <eldad@fogrefinery.com>
> Date: Wed, 30 May 2012 00:30:35 +0200
> 
> > In the current flow, when you take down a physical device that has
> > VLANs configured on it, the NETDEV_GOING_DOWN notification will be
> > sent too late, i.e., no data can be sent to the wire anymore.
> 
> Why do you need to send data?  Any queued up data should be purged not
> sent.

In case a certain protocol needs to send a "dying gasp" packet, when you 
administrativly shutdown the port (which is also what happens when you 
restart the machine).

I'm working on an implementation of such protocol (LLDP) on my free 
time. The specification says that it should send a (compact) shutdown 
message, with the TTL field set to zero, so that other stations are informed
of the shutdown - and it works fine with the main interface, but not with 
VLANs, since the notifier is called too late.
With that small change it works as well.

Another use for it would be the Ethernet CFM, which has a similar 
requirement.

On the other hand, I might've missed something. Is there a better way to 
be informed of a shutdown than listening for the GOING_DOWN 
event, so the frame can be sent to the wire when it's appropriate?

Eldad

  reply	other threads:[~2012-05-30 19:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 22:30 [PATCH] 8021q/vlan: process NETDEV_GOING_DOWN Eldad Zack
2012-05-30  0:40 ` David Miller
2012-05-30 19:11   ` Eldad Zack [this message]
2012-05-30 20:27     ` David Miller
2012-05-30 21:47       ` Eldad Zack
2012-05-30 21:50         ` David Miller
2012-05-30 22:02           ` Eldad Zack

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=alpine.DEB.2.02.1205302055140.1587@debianer \
    --to=eldad@fogrefinery.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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