]> git.hungrycats.org Git - linux/commit
net: dsa: netc: implement dynamic FDB entry ageing
authorWei Fang <wei.fang@nxp.com>
Thu, 11 Jun 2026 02:14:58 +0000 (10:14 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 21:32:06 +0000 (14:32 -0700)
commit05b5ee610fbb8ca4ce9dc21299442aa827b38008
tree561fa9fe14c05f2aa969450a5fc9e5523172c882
parent751aa5a5d593e19204d3e8ed0787a18a29a18690
net: dsa: netc: implement dynamic FDB entry ageing

The NETC switch does not age out dynamic FDB entries automatically.
Without software management, stale entries persist after topology
changes and cause incorrect forwarding.

Add a delayed work that periodically removes entries that have not been
refreshed within the specified cycles. The effective ageing time is:

  ageing_time = fdbt_ageing_delay * 100

Default values are 3s interval and 100 cycles (300s total), matching
the IEEE 802.1Q default ageing time. The work starts when the first
port joins a bridge (tracked via br_cnt) and is cancelled when the
last port leaves. All FDB operations are serialized under fdbt_lock.

Implement .set_ageing_time() to allow the bridge layer to reconfigure
ageing parameters on demand.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260611021458.2629145-10-wei.fang@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/netc/netc_main.c
drivers/net/dsa/netc/netc_switch.h