Skip to content

Commit c964d8d

Browse files
committed
pinctrl: Convert the put_ARP/ND/FDB actions to be lockless.
The put_ARP/ND/FDB were bound to pinctrl lock to prevent data races as they have used shared hmap to store the data that were later on added into SB. This is problematic in situations when main thread holds the lock and we have to process any put_ARP/ND/FDB packet. That contention would block the pinctrl thread from processing the incoming packets. The same can happen from the opposite side, pinctrl could be holding a lock, delaying main thread from processing other updates. To prevent that use the hmap only by main thread, this will ensure that we wait properly for the multicast timeout to expire and at the same time to do the deduplication. Once the entry arrives it will be shared by thread-safe ring buffer and consumed by main thread. Reported-at: https://redhat.atlassian.net/browse/FDP-3924 Signed-off-by: Ales Musil <amusil@redhat.com> --- v2: Reabse on top of latest main. Make sure the run_put_* and wait_put_* are running outside of the pinxtrl mutex critical section.
1 parent 776aece commit c964d8d

1 file changed

Lines changed: 105 additions & 78 deletions

File tree

0 commit comments

Comments
 (0)