From: Veli-Matti Lintu <veli-matti.lintu@opinsys.fi>
To: Jay Vosburgh <jay.vosburgh@canonical.com>
Cc: netdev <netdev@vger.kernel.org>,
Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <gospo@cumulusnetworks.com>,
zhuyj <zyjzyj2000@gmail.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net] bonding: fix 802.3ad aggregator reselection
Date: Tue, 5 Jul 2016 17:01:57 +0300 [thread overview]
Message-ID: <CAKdSkDXBhg-n=TrZ6UiVp-xSxgYmKJ3Oaa-5ei_N+kRu7Xf_5Q@mail.gmail.com> (raw)
In-Reply-To: <CAKdSkDXprDpOUbKqw7+sqAj8LZ2tGC17YONmX0D1oLLUnCvRYw@mail.gmail.com>
2016-06-30 14:15 GMT+03:00 Veli-Matti Lintu <veli-matti.lintu@opinsys.fi>:
> 2016-06-29 18:59 GMT+03:00 Jay Vosburgh <jay.vosburgh@canonical.com>:
>> Veli-Matti Lintu <veli-matti.lintu@opinsys.fi> wrote:
>> I tried this locally, but don't see any failure (at the end, the
>> "Switch A" agg is still active with the single port). I am starting
>> with just two ports in each aggregator (instead of three), so that may
>> be relevant.
>
> When the connection problem occurs, /proc/net/bonding/bond0 always
> shows the aggregator that has a link up active. Dumpcap sees at least
> broadcast traffic on the port, but I haven't done extensive analysis
> on that yet. All TCP connections are cut until the bond is up again
> when more ports are enabled on the switch. ping doesn't work either
> way.
I did some further testing on this and it looks like I can get this
working by enabling the ports in the new aggregator the same way as
the ports in old aggregator are disabled in ad_agg_selection_logic().
Normally the ports seem to get enabled from ad_mux_machine() in "case
AD_MUX_COLLECTING_DISTRIBUTING", but something different happens there
as the port does get enabled, but no traffic passes through. So far I
haven't been able to figure out what happens. When the connection is
lost, dumpcap sees traffic on the only active port in the bond, but it
seems like nothing catches it. If I disable and re-enable the same
port, traffic start flowing again normally.
Here's the patch I used for testing on top of 4.7.0-rc6. I haven't
tested this with other modes or h/w setups yet.
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index ca81f46..45c06c4 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1706,6 +1706,25 @@ static void ad_agg_selection_logic(struct
aggregator *agg,
__disable_port(port);
}
}
+
+ /* Enable ports in the new aggregator */
+ if (best) {
+ netdev_dbg(bond->dev, "Enable ports\n");
+
+ for (port = best->lag_ports; port;
+ port = port->next_port_in_aggregator) {
+ netdev_dbg(bond->dev, "Agg: %d, P=%d:
Port: %s; Enabled=%d\n",
+ best->aggregator_identifier,
+ best->num_of_ports,
+ port->slave->dev->name,
+ __port_is_enabled(port));
+
+ if (!__port_is_enabled(port))
+ __enable_port(port);
+ }
+ }
+
+
/* Slave array needs update. */
*update_slave_arr = true;
}
Veli-Matti
next prev parent reply other threads:[~2016-07-05 14:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 21:20 [PATCH net] bonding: fix 802.3ad aggregator reselection Jay Vosburgh
2016-06-28 8:20 ` David Miller
2016-06-28 11:57 ` Veli-Matti Lintu
2016-06-29 15:59 ` Jay Vosburgh
2016-06-30 11:15 ` Veli-Matti Lintu
2016-07-05 14:01 ` Veli-Matti Lintu [this message]
2016-07-05 20:52 ` Veli-Matti Lintu
2016-07-05 21:20 ` Jay Vosburgh
2016-07-07 20:04 ` Veli-Matti Lintu
2016-07-08 1:48 ` Jay Vosburgh
2016-07-08 12:22 ` Veli-Matti Lintu
2016-08-18 9:28 ` Veli-Matti Lintu
[not found] ` <CAD=hENfHOVBzwrC2Yy371FvxRG9AyJpvAm+s4R6hzU_+o=tJYA@mail.gmail.com>
2016-07-05 13:59 ` Veli-Matti Lintu
2016-07-05 20:02 ` Jay Vosburgh
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='CAKdSkDXBhg-n=TrZ6UiVp-xSxgYmKJ3Oaa-5ei_N+kRu7Xf_5Q@mail.gmail.com' \
--to=veli-matti.lintu@opinsys.fi \
--cc=davem@davemloft.net \
--cc=gospo@cumulusnetworks.com \
--cc=jay.vosburgh@canonical.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
--cc=zyjzyj2000@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 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).