]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: enetc: add interfaces to manage dynamic FDB entries
authorWei Fang <wei.fang@nxp.com>
Thu, 11 Jun 2026 02:14:50 +0000 (10:14 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 21:32:05 +0000 (14:32 -0700)
commitca394837dfddba669e0021b8be7f1e68affb206b
tree933acaad88a5fc738cb73d2932902f4e88d60d1c
parent3b165c2a29cfb6453f26e1ac833ca6afd28d28cf
net: enetc: add interfaces to manage dynamic FDB entries

Add three interfaces to manage dynamic entries in the FDB table:

ntmp_fdbt_update_activity_element(): Update the activity element of all
dynamic FDB entries. For each entry, if its activity flag is not set,
which means no packet has matched this entry since the last update, the
activity counter is incremented. Otherwise, both the activity flag and
activity counter are reset. The activity counter is used to track how
long an FDB entry has been inactive, which is useful for implementing
an ageing mechanism.

ntmp_fdbt_delete_ageing_entries(): Delete all dynamic FDB entries whose
activity flag is not set and whose activity counter is greater than or
equal to the specified threshold. This is used to remove stale entries
that have been inactive for too long.

ntmp_fdbt_delete_port_dynamic_entries(): Delete all dynamic FDB entries
associated with the specified switch port. This is typically called when
a port goes down or is removed from a bridge.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260611021458.2629145-2-wei.fang@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/ntmp.c
drivers/net/ethernet/freescale/enetc/ntmp_private.h
include/linux/fsl/ntmp.h