diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-15 19:36:13 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-12-11 03:23:48 +0100 |
commit | 2dfde4b8f819588f4fda92925fa4520f40238ac2 (patch) | |
tree | aaaba934510ac723f9713994e98c2a6c9b9143f6 /rules.d | |
parent | network: introduce link_up_now() (diff) | |
download | systemd-2dfde4b8f819588f4fda92925fa4520f40238ac2.tar.xz systemd-2dfde4b8f819588f4fda92925fa4520f40238ac2.zip |
network: optionally bring up interface before joining bridge
Closes #34247.
Diffstat (limited to 'rules.d')
-rw-r--r-- | rules.d/81-net-bridge.rules | 16 | ||||
-rw-r--r-- | rules.d/meson.build | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/rules.d/81-net-bridge.rules b/rules.d/81-net-bridge.rules new file mode 100644 index 0000000000..defb31fe31 --- /dev/null +++ b/rules.d/81-net-bridge.rules @@ -0,0 +1,16 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="net_bridge_end" +SUBSYSTEM!="net", GOTO="net_bridge_end" + +# Some devices require the port to be up before joining the bridge. +# In such cases, set ID_NET_BRING_UP_BEFORE_JOINING_BRIDGE to "1". + +# Texas Instruments Ethernet device with switchdev mode: +# https://docs.kernel.org/networking/device_drivers/ethernet/ti/am65_nuss_cpsw_switchdev.html#enabling-switch +ENV{ID_NET_DRIVER}=="am65-cpsw-nuss", SUBSYSTEMS=="platform", DRIVERS=="am65-cpsw-nuss", \ + PROGRAM="/usr/sbin/devlink dev param show platform/%b name switch_mode", \ + RESULT=="*cmode runtime value true*", \ + ENV{ID_NET_BRING_UP_BEFORE_JOINING_BRIDGE}="1" + +LABEL="net_bridge_end" diff --git a/rules.d/meson.build b/rules.d/meson.build index 3040fae8a4..61165fd86f 100644 --- a/rules.d/meson.build +++ b/rules.d/meson.build @@ -29,6 +29,7 @@ rules = [ '75-probe_mtd.rules', '78-sound-card.rules', '80-net-setup-link.rules', + '81-net-bridge.rules', '81-net-dhcp.rules', '90-iocost.rules', )], |