Some kernel customers exporting network interfaces may require sleep during the iteration. Netlink and linsysfs can be the examples.
This change adds the generic iteration interface, similar to if_foreach(), but allowing the callback to sleep.
Differential D38904
ifnet: add if_foreach_sleep() to allow ifnet iterations with sleep. Authored by melifaro on Mar 4 2023, 10:10 AM.
Details Some kernel customers exporting network interfaces may require sleep during the iteration. Netlink and linsysfs can be the examples. This change adds the generic iteration interface, similar to if_foreach(), but allowing the callback to sleep.
Diff Detail
Event Timeline
Comment Actions As discussed in email, if_foreach_sleep() sounds like the loop itself inserts a delay. I suggest changing it to if_foreach_sleepable(), which more accurately conveys that it can sleep (or use callbacks that can sleep), not that that it does sleep. | ||||||||||