All of lore.kernel.org
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@redhat.com>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/4] bonding: update the primary when slave name changed
Date: Fri, 10 Jan 2014 12:11:43 +0100	[thread overview]
Message-ID: <20140110111143.GB4132@redhat.com> (raw)
In-Reply-To: <52CFD3FE.9000805@huawei.com>

On Fri, Jan 10, 2014 at 07:05:34PM +0800, Ding Tianhong wrote:
>On 2014/1/10 15:44, Veaceslav Falico wrote:
>> If it's not the primray
>> slave, and we don't have one - select it as a new primary and, again, see
>> if we need to select a new active slave.
>
>I don't think so , I think if it is not the primary slave and we don't have one,
>no need to do anything, just a normal slave change its name.

If primary == "my_eth0", you have 2 slaves - "eth0" and "eth1", thus null
primary_slave, and rename eth0 to my_eth0 - then you need to set
primary_slave to my_eth0.

If primary == "my_eth0", you have 2 slaves - "my_eth0" and "eth1", thus
primary_slave == dev with name "my_eth0", and rename "my_eth0" to "eth0" -
then you must set primary_slave to NULL.

And after either of these you must see if you need to re-select the active
slave, as it might have been forced by the primary_slave, which has been
modified.

You might also want to add some pr_info() about adding/removing
primary_slave, as the user to be aware.

  reply	other threads:[~2014-01-10 11:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 11:20 [PATCH net-next 1/4] bonding: update the primary when slave name changed Ding Tianhong
2014-01-09 11:46 ` Veaceslav Falico
2014-01-09 12:23   ` Ding Tianhong
2014-01-09 12:30     ` Veaceslav Falico
2014-01-10  4:20       ` Ding Tianhong
2014-01-10  7:44         ` Veaceslav Falico
2014-01-10 11:05           ` Ding Tianhong
2014-01-10 11:11             ` Veaceslav Falico [this message]
2014-01-10 11:55               ` Ding Tianhong

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=20140110111143.GB4132@redhat.com \
    --to=vfalico@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=fubar@us.ibm.com \
    --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 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.