sfc: remove expired unicast PTP filters
authorÍñigo Huguet <ihuguet@redhat.com>
Fri, 31 Mar 2023 11:14:04 +0000 (13:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Apr 2023 02:02:51 +0000 (19:02 -0700)
commitad47655eadc8918a60c4165237a4c7da383c1d08
treee5292b614fd0d1e359ea09b8915d18d47bde39ec
parent49ed35a0b6aafacd5e4d7c24ed6c02fbfbadaedc
sfc: remove expired unicast PTP filters

Filters inserted to support unicast PTP mode might become unused after
some time, so we need to remove them to avoid accumulating many of them.

Refresh the expiration time of a filter each time it's used. Then check
periodically if any filter hasn't been used for a long time (30s) and
remove it.

Reported-by: Yalin Li <yalli@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/ptp.c