Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: anuradhak@cumulusnetworks.com
Cc: davem@davemloft.net, sfeldma@gmail.com, netdev@vger.kernel.org,
	roopa@cumulusnetworks.com, gospo@cumulusnetworks.com,
	wkok@cumulusnetworks.com
Subject: Re: [RFC PATCH net-next v3 0/4] net: Introduce IFF_PROTO_DOWN flag.
Date: Wed, 29 Apr 2015 15:08:41 -0700	[thread overview]
Message-ID: <20150429150841.55477595@urahara> (raw)
In-Reply-To: <1430156304-13187-1-git-send-email-anuradhak@cumulusnetworks.com>

On Mon, 27 Apr 2015 10:38:20 -0700
anuradhak@cumulusnetworks.com wrote:

> From: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
> 
> User space daemons can detect errors in the network that need to be
> notified to the switch device drivers. 
> 
> Drivers can react to this error state by doing a phy-down on the
> switch-port which would result in a carrier-off locally and on the
> directly connected switch. Doing that would prevent loops and
> black-holes in the network.
> 
> One such use case is the multi-chassis LAG application -
> 1. The MLAG application runs on peer switches (say Switch0 and Switch1)
>    synchronizing states, forwarding entries etc. between the two
>    switches over the peer-link (this is a link directly connecting the
>    two switches).
> 2. An MLAG election process designates one of the switches as a primary
>    (for e.g. Switch0 is primary and Switch1 is secondary). 
> 3. The peer link plays a critical role in allowing Switch0-Switch1 to
>    function as a single LAG partner to the downstream dual-connected
>    servers. When the peer-link between the switches goes down we have a
>    split-brain situation. Switch0 and Switch1 are no longer in sync and
>    are acting independently. This can result in traffic loops and
>    traffic black-holing in the network. 
> 4. To prevent these problems the MLAG application on the secondary
>    switch phy-downs the MLAG ports on detecting the peer-link down.
>    This will be seen as a carrier down on servers that are
>    dual-connected to Switch0 and Switch1.
> 5. Specifically a dual-connected server will see a carrier-down on the
>    port connected to the MLAG secondary, Switch1, and will stop using
>    that port for traffic TX. So traffic black holing is prevented.
> 
> v2 to v3:
>    In response to Dave’s comments I have tried to make IFF_PROTODOWN
>    more easily consumable by providing switchdev APIs to control the
>    phy state of the switch port. The use case is relevant primarily to
>    switch drivers at this point. That is the reason for making the
>    change in rocker (commonly used switch driver example).
> 
>    One other change that could be done is to bring back the net-core
>    change to hold the oper state down in response to IFF_PROTO_DOWN.
>    This would be a driver agnostic change and the phy-down could be done
>    in addition by interested switch drivers.
> 
> v1 to v2:
>    Based on Dave's suggestion I have moved out aggregating of error bits
>    across applications to a user space framework. This patch now simply
>    notifies an aggregated error bit to drivers enabling them to handle
>    the error gracefully.
> 
> 
> Anuradha Karuppiah (4):
>   net core: Add IFF_PROTO_DOWN support.
>   switchdev: APIs for setting physical state of the switch port.
>   rocker: Handle IFF_PROTODOWN by doing a PHYS-DOWN on the switch port.
>   ip link: Config and display IFF_PROTO_DOWN flag.
> 
> Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
> Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
> 
>  drivers/net/ethernet/rocker/rocker.c |   16 +++++++++++++++-
>  include/net/switchdev.h              |   12 ++++++++++++
>  include/uapi/linux/if.h              |    4 ++++
>  net/8021q/vlan_dev.c                 |    3 ++-
>  net/core/dev.c                       |    8 +++++++-
>  net/switchdev/switchdev.c            |   23 +++++++++++++++++++++++
>  6 files changed, 63 insertions(+), 3 deletions(-)
> 

How does this interact with operstate?
It seems RFC2863 operstate (Documentation/network/operstates.txt) already
has concept of LOWERLAYERDOWN

  parent reply	other threads:[~2015-04-29 22:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 17:38 [RFC PATCH net-next v3 0/4] net: Introduce IFF_PROTO_DOWN flag anuradhak
2015-04-28  5:45 ` Scott Feldman
2015-04-28 15:43   ` Anuradha Karuppiah
     [not found]   ` <CACcJQnRw5HVUb0M3A2u_zbMtp85pi+kdCUa5gaY6cN4HXpVyeQ@mail.gmail.com>
2015-04-28 19:37     ` Scott Feldman
2015-04-28 20:04       ` Anuradha Karuppiah
2015-04-29  0:28         ` Scott Feldman
2015-04-29 22:04           ` Anuradha Karuppiah
2015-04-29 22:08 ` Stephen Hemminger [this message]
2015-04-29 22:58   ` Anuradha Karuppiah

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=20150429150841.55477595@urahara \
    --to=stephen@networkplumber.org \
    --cc=anuradhak@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=gospo@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=sfeldma@gmail.com \
    --cc=wkok@cumulusnetworks.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