From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch,
vivien.didelot@gmail.com, f.fainelli@gmail.com,
olteanv@gmail.com, vfalico@gmail.com, andy@greyhouse.net,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] net: bonding: Notify ports about their initial state
Date: Thu, 19 Nov 2020 10:18:02 -0800 [thread overview]
Message-ID: <365.1605809882@famine> (raw)
In-Reply-To: <20201119144508.29468-2-tobias@waldekranz.com>
Tobias Waldekranz <tobias@waldekranz.com> wrote:
>When creating a static bond (e.g. balance-xor), all ports will always
>be enabled. This is set, and the corresponding notification is sent
>out, before the port is linked to the bond upper.
>
>In the offloaded case, this ordering is hard to deal with.
>
>The lower will first see a notification that it can not associate with
>any bond. Then the bond is joined. After that point no more
>notifications are sent, so all ports remain disabled.
Why are the notifications generated in __netdev_upper_dev_link
(via bond_master_upper_dev_link) not sufficient?
>This change simply sends an extra notification once the port has been
>linked to the upper to synchronize the initial state.
>
>Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
>---
> drivers/net/bonding/bond_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 71c9677d135f..80c164198dcf 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -1897,6 +1897,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
> goto err_unregister;
> }
>
>+ bond_lower_state_changed(new_slave);
>+
> res = bond_sysfs_slave_add(new_slave);
> if (res) {
> slave_dbg(bond_dev, slave_dev, "Error %d calling bond_sysfs_slave_add\n", res);
Would it be better to add this call further down, after all
possible failures have been checked? I.e., if this new call to
bond_lower_state_changed() completes, and then very soon afterwards the
upper is unlinked, could that cause any issues?
-J
---
-Jay Vosburgh, jay.vosburgh@canonical.com
next prev parent reply other threads:[~2020-11-19 18:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 14:45 [PATCH net-next 0/4] net: dsa: Link aggregation support Tobias Waldekranz
2020-11-19 14:45 ` [PATCH net-next 1/4] net: bonding: Notify ports about their initial state Tobias Waldekranz
2020-11-19 18:18 ` Jay Vosburgh [this message]
2020-11-19 21:20 ` Tobias Waldekranz
2020-11-19 14:45 ` [PATCH net-next 2/4] net: dsa: Link aggregation support Tobias Waldekranz
2020-11-20 0:30 ` Andrew Lunn
2020-11-20 2:43 ` Florian Fainelli
2020-11-20 13:30 ` Andrew Lunn
2020-11-26 22:36 ` Tobias Waldekranz
2020-11-26 22:57 ` Andrew Lunn
2020-11-27 9:19 ` Tobias Waldekranz
2020-11-27 16:28 ` Andrew Lunn
2020-11-27 23:19 ` Tobias Waldekranz
2020-11-28 5:19 ` Florian Fainelli
2020-11-28 16:38 ` Andrew Lunn
2020-11-28 19:48 ` Tobias Waldekranz
2020-11-19 14:45 ` [PATCH net-next 3/4] net: dsa: mv88e6xxx: " Tobias Waldekranz
2020-11-19 14:45 ` [PATCH net-next 4/4] net: dsa: tag_dsa: Support reception of packets from LAG devices Tobias Waldekranz
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=365.1605809882@famine \
--to=jay.vosburgh@canonical.com \
--cc=andrew@lunn.ch \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=tobias@waldekranz.com \
--cc=vfalico@gmail.com \
--cc=vivien.didelot@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).