All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Jonathan Toppins <jtoppins@redhat.com>
Cc: Jay Vosburgh <jay.vosburgh@canonical.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Veaceslav Falico <vfalico@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: bonding: link state question
Date: Mon, 9 Aug 2021 12:10:21 +0200	[thread overview]
Message-ID: <20210809101021.GA20448@1wt.eu> (raw)
In-Reply-To: <79019b7e-1c2e-7186-4908-cf085b33fb59@redhat.com>

Hi Jonathan,

On Sun, Aug 08, 2021 at 09:31:39PM -0400, Jonathan Toppins wrote:
> I am likely very wrong but the lack of a recalculation of the bond carrier
> state after a lower notifies of an up/down event seemed incorrect. Maybe a
> place to start?

Thanks for the test, it could have been a good candidate but it does
not work :-)

That's what I have after the following sequence:

  - link is up
  - suspend-to-ram
  - unplug the cable
  - resume

  $ ip -br li
  eth0             DOWN           e8:6a:64:5d:19:ed <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> 
  eth0.2@eth0      UP             e8:6a:64:5d:19:ed <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> 
  bond0            UP             e8:6a:64:5d:19:ed <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> 

My bond interface uses eth0 and eth0.2 in active-backup scenario allowing
me to instantly switch between tagged/untagged network depending on the
port I'm connecting to.

I just figured the problem. It's not the bonding driver which is causing
this issue, the issue is with the VLAN interface which incorrectly shows
up while it ought not to, as can be seen above, and the bond naturally
selected it:

  Primary Slave: eth0 (primary_reselect always)
  Currently Active Slave: eth0.2
  MII Status: up
  MII Polling Interval (ms): 200
  Up Delay (ms): 0
  Down Delay (ms): 0
  Peer Notification Delay (ms): 0

So the bond driver works well, I'll have to dig into the 802.1q code
and/or see how the no-carrier state is propagated upstream. So you were
not very wrong at all and put me on the right track :-)

Cheers,
Willy

      reply	other threads:[~2021-08-09 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 21:26 bonding: link state question Jonathan Toppins
2021-08-07 22:42 ` Jay Vosburgh
2021-08-08  0:09   ` Jonathan Toppins
2021-08-08  4:49     ` Willy Tarreau
2021-08-09  1:31       ` Jonathan Toppins
2021-08-09 10:10         ` Willy Tarreau [this message]

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=20210809101021.GA20448@1wt.eu \
    --to=w@1wt.eu \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=jay.vosburgh@canonical.com \
    --cc=jtoppins@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@gmail.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 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.