realtek: add cond_resched to loops accessing the FDB table
authorJan Hoffmann <jan@3e8.eu>
Sat, 17 Dec 2022 20:45:43 +0000 (21:45 +0100)
committerSander Vanheule <sander@svanheule.net>
Tue, 27 Dec 2022 15:29:57 +0000 (16:29 +0100)
commit2c40359c5c12621fa386efca3139ea523db6d39f
tree81e916c19fb678eeb067e809a2911a2e31b28c26
parentae0a3f88ac335801f17035504ba572d14205787a
realtek: add cond_resched to loops accessing the FDB table

A full loop accessing all FDB entries can take several milliseconds
(on RTL839x about 20 ms), so give other kernel tasks a chance to run.
This is especially important for rtl83xx_port_fdb_dump which is itself
called in a loop for all ports by the kernel.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/debugfs.c
target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/debugfs.c
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c