]> git.baikalelectronics.ru Git - kernel.git/commit
net: bonding: Notify ports about their initial state
authorTobias Waldekranz <tobias@waldekranz.com>
Wed, 13 Jan 2021 08:42:51 +0000 (09:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Jan 2021 01:11:55 +0000 (17:11 -0800)
commited4684387d576f1be9687d5ab7283b0b93642c0b
tree635982d83bd0c4d0d8b116ff3d1f28f37313acce
parent9d0df93e4621ef6f82d64343b08a99fbe779abcf
net: bonding: Notify ports about their initial state

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.

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>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/bonding/bond_main.c