netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.com>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: David Miller <davem@davemloft.net>,
	Stephen Hemminger <shemminger@vyatta.com>,
	andy@greyhouse.net,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] bonding: document two undocumented options.
Date: Thu, 04 Aug 2011 07:41:53 +0200	[thread overview]
Message-ID: <4E3A3121.3030403@gmail.com> (raw)
In-Reply-To: <3571.1312405193@death>

Le 03/08/2011 22:59, Jay Vosburgh a écrit :
> Nicolas de Pesloüan<nicolas.2p.debian@gmail.com>  wrote:

<snip>

>> The obvious default value should be 1, but I cannot confirm it is.
>
> 	Looking at it now, I see no initialization, and it's a static,
> so I believe it will end up being zero.  From the code, zero seems like
> the proper default, since it will make this test never pass:
>
>                  /* are enough slaves available to consider link up? */
>                  if (active->num_of_ports<  bond->params.min_links) {
>                          if (netif_carrier_ok(bond->dev)) {
>                                  netif_carrier_off(bond->dev);
>                                  return 1;
>                          }
>
> 	This will cause carrier to be asserted (for 802.3ad mode)
> whenever there is an active aggregator, regardless of the number of
> available links in that aggregator.
>
>> Stephen, as the author of this feature, can you please clarify what the default value for min_links is?
>>
>> V2 will follow, giving the real default value for all_slaves_active and
>> what I consider the sensible default value for max_links, even if the
>> technical real default value is currently unclear.
>
> 	I think the actual and sensible default are both zero, although
> the documentation should probably mention that a value of zero is magic
> and won't ever set the bond down due to too few ports (links) active.
>
> 	Or, perhaps describe it how it actually works: if there are
> fewer than "min_links" ports in the active aggregator, the bond is set
> carrier down.  The default min_links value of zero means that the bond
> will never be set down due to having too few ports active.

Well, you are right, but for as far as I understand, using 1 as the default value for min_links 
would cause the exact same behavior.

And 1 would be less "magical" and as such, more understandable from a user point of view. User might 
understand min_links=0 as "assert carrier on if at least 0 link have carrier on", which might be 
understood as "always assert carrier on".

	Nicolas.

  reply	other threads:[~2011-08-04  5:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 20:06 [PATCH] bonding: document two undocumented options Nicolas de Pesloüan
2011-08-03  6:43 ` bonding and ifenslave version Nicolas de Pesloüan
2011-08-03 19:03   ` Andy Gospodarek
2011-08-03 19:38     ` Nicolas de Pesloüan
2011-08-03 20:07       ` Jay Vosburgh
2011-08-03 20:38         ` Nicolas de Pesloüan
2011-08-03 21:33           ` Stephen Hemminger
2011-08-04  5:31             ` Nicolas de Pesloüan
2011-08-04 16:57               ` Stephen Hemminger
2011-08-04 21:20                 ` Nicolas de Pesloüan
2011-08-03 10:44 ` [PATCH] bonding: document two undocumented options David Miller
2011-08-03 20:01   ` Nicolas de Pesloüan
2011-08-03 20:59     ` Jay Vosburgh
2011-08-04  5:41       ` Nicolas de Pesloüan [this message]
2011-08-06 17:06       ` [PATCH v3] " Nicolas de Pesloüan
2011-08-08  5:16         ` David Miller
2011-08-03 20:02   ` [PATCH] " Nicolas de Pesloüan

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=4E3A3121.3030403@gmail.com \
    --to=nicolas.2p.debian@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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).