linux-yocto/drivers/net
Hangbin Liu ac511b5dd8 bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU
[ Upstream commit 0599640a21e98f0d6a3e9ff85c0a687c90a8103b ]

When `lacp_active` is set to `off`, the bond operates in passive mode, meaning
it only "speaks when spoken to." However, the current kernel implementation
only sends an LACPDU in response when the partner's state changes.

As a result, once LACP negotiation succeeds, the actor stops sending LACPDUs
until the partner times out and sends an "expired" LACPDU. This causes
continuous LACP state flapping.

According to IEEE 802.1AX-2014, 6.4.13 Periodic Transmission machine. The
values of Partner_Oper_Port_State.LACP_Activity and
Actor_Oper_Port_State.LACP_Activity determine whether periodic transmissions
take place. If either or both parameters are set to Active LACP, then periodic
transmissions occur; if both are set to Passive LACP, then periodic
transmissions do not occur.

To comply with this, we remove the `!bond->params.lacp_active` check in
`ad_periodic_machine()`. Instead, we initialize the actor's port's
`LACP_STATE_LACP_ACTIVITY` state based on `lacp_active` setting.

Additionally, we avoid setting the partner's state to
`LACP_STATE_LACP_ACTIVITY` in the EXPIRED state, since we should not assume
the partner is active by default.

This ensures that in passive mode, the bond starts sending periodic LACPDUs
after receiving one from the partner, and avoids flapping due to inactivity.

Fixes: 3a755cd8b7 ("bonding: add new option lacp_active")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20250815062000.22220-3-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-28 16:26:18 +02:00
..
appletalk
arcnet
bonding bonding: send LACPDUs periodically in passive mode after receiving partner's LACPDU 2025-08-28 16:26:18 +02:00
caif
can can: kvaser_usb: Assign netdev.dev_port based on device channel index 2025-08-15 12:05:00 +02:00
dsa net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325 2025-08-28 16:25:58 +02:00
ethernet igc: fix disabling L1.2 PCI-E link substate on I226 on init 2025-08-28 16:26:18 +02:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Fix panic during namespace deletion with VF 2025-08-28 16:26:04 +02:00
ieee802154 ieee802154: ca8210: Use proper setters and getters for bitwise types 2025-06-04 14:40:08 +02:00
ipa
ipvlan
mctp
mdio
netdevsim
pcs
phy phy: mscc: Fix timestamping for vsc8584 2025-08-28 16:26:18 +02:00
plip
ppp ppp: fix race conditions in ppp_fill_forward_path 2025-08-28 16:26:18 +02:00
pse-pd
slip
team
usb net: usb: asix_devices: Fix PHY address mask in MDIO bus initialization 2025-08-28 16:26:18 +02:00
vmxnet3 vmxnet3: correctly report gso type for UDP tunnels 2025-06-27 11:07:18 +01:00
vxlan net: add netdev_lockdep_set_classes() to virtual drivers 2025-08-28 16:26:10 +02:00
wan
wireguard wireguard: device: enable threaded NAPI 2025-06-27 11:07:18 +01:00
wireless wifi: ath11k: fix dest ring-buffer corruption when ring is full 2025-08-28 16:26:07 +02:00
wwan
xen-netback
amt.c
bareudp.c
dummy.c net: add netdev_lockdep_set_classes() to virtual drivers 2025-08-28 16:26:10 +02:00
eql.c
geneve.c net: add netdev_lockdep_set_classes() to virtual drivers 2025-08-28 16:26:10 +02:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: add netdev_lockdep_set_classes() to virtual drivers 2025-08-28 16:26:10 +02:00
macsec.c macsec: MACsec SCI assignment for ES = 0 2025-06-27 11:07:22 +01:00
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c net: thunderbolt: Fix the parameter passing of tb_xdomain_enable_paths()/tb_xdomain_disable_paths() 2025-08-28 16:25:57 +02:00
tun.c
veth.c net: add netdev_lockdep_set_classes() to virtual drivers 2025-08-28 16:26:10 +02:00
virtio_net.c virtio-net: ensure the received length does not exceed allocated size 2025-07-10 15:59:51 +02:00
vrf.c vrf: Drop existing dst reference in vrf_ip6_input_dst 2025-08-15 12:05:00 +02:00
vsockmon.c
xen-netfront.c xen/netfront: Fix TX response spurious interrupts 2025-08-28 16:25:55 +02:00