]> exis.tech > repos - linux.git/commit
selftests: bonding: add a test for VLAN propagation over a bonded real device
authorJakub Kicinski <kuba@kernel.org>
Wed, 24 Jun 2026 18:20:18 +0000 (11:20 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Jun 2026 17:18:40 +0000 (10:18 -0700)
commite83d0a2472617327e04b74272a61fca06f6f84ff
tree4585457ad181200fa84bc605c3679656f8a17e84
parentcd1c188db1091991fc1d7f565824d077d659425b
selftests: bonding: add a test for VLAN propagation over a bonded real device

Add a regression test for the VLAN notifier handling that the netdev_work
deferral fixed.

A VLAN's real device propagates its UP/DOWN, MTU and feature changes onto
the VLANs stacked on top of it. This used to be done synchronously from the
real device's notifier and deadlocked when the real device was brought up
while enslaved to a bond (instance lock held across NETDEV_UP) and the VLAN
on top was itself a bond member: the synchronous propagation re-entered the
stack and took the same instance lock again.

The test covers both halves:
 - that the deferred UP/DOWN, MTU and feature propagation actually lands on
   the VLAN (link state and MTU use an ops-locked dummy, i.e. the deferral
   path; features use veth, which exports vlan_features to inherit), and
 - that the deadlock-prone topology - a VLAN on a dummy, with the VLAN and
   the dummy each enslaved to a different bond - can be built without
   hanging.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260624182018.2445732-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/bonding/Makefile
tools/testing/selftests/drivers/net/bonding/bond_vlan_real_dev.sh [new file with mode: 0755]