]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bonding: do failover when high prio link up
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 12 Dec 2022 03:56:46 +0000 (11:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:37 +0000 (13:26 +0100)
commit43ceac57ace38511d0593ff49fcbaa9a19054395
treec763bfde35414e8d2ef79a77f3be09c2b55df170
parent8a7afdbc814b30a5404a2ef2a434b553685a4982
bonding: do failover when high prio link up

[ Upstream commit e95cc44763a41d5c715ef16742bcb1d8e6524a62 ]

Currently, when a high prio link enslaved, or when current link down,
the high prio port could be selected. But when high prio link up, the
new active slave reselection is not triggered. Fix it by checking link's
prio when getting up. Making the do_failover after looping all slaves as
there may be multi high prio slaves up.

Reported-by: Liang Li <liali@redhat.com>
Fixes: 0a2ff7cc8ad4 ("Bonding: add per-port priority for failover re-selection")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/bonding/bond_main.c