[PATCH RFC batadv v4 0/8] batman-adv: tt: atomic sashiko fixes
Sven Eckelmann <[email protected]>
| Newsgroups | org.open-mesh.lists.batman |
|---|---|
| Message-ID | <[email protected]> |
There were a couple of sashiko reports regarding the batadv-next-pullrequest-20260728 PR. I went through the TT code and tried to handle them and at the same time already predict what else sashiko might report as next. I needed to change the batadv_tt_local_remove() hash interaction as preparation for the related NEW flag (and counter) handling. And the netdev maintainers rejected this approach (for now). I had to re-add the atomic_t code parts back in this patchset. But since the netdev maintainers didn't like the atomic_t implementation, everything was changed to atomic_t with the help of scoped_guard() or spin_(un)lock_bh (when the routine used "goto"). Signed-off-by: Sven Eckelmann <[email protected]> --- Changes in v4: - fix setting of BATADV_TT_CLIENT_ROAM batadv_tt_local_add_roam() - move the roam_at setting in batadv_tt_global_del_roaming() before the setting of the flag - don't unset BATADV_TT_CLIENT_NEW when avoiding the batadv_tt_local_size_dec() - it is simply not needed - new patch: fix lock precondition for batadv_tt_local_size_inc() and document it - clean up mini-helpers to avoid goto. precondition for using scoped_guard - switch routines with goto's from scoped_guard to spin_(un)lock_bh - Link to v3: https://patch.msgid.link/[email protected] Changes in v3: - switched to spinlock_bh due to rejection atomic_t by netdev (and potentially easier code) - switch back to RFC - Link to v2: https://patch.msgid.link/[email protected] Changes in v2: - rebase on main - add "batman-adv: tt: use atomic flag modifications" and "batman-adv: tt: simplify NEW flag transition code" because they are reverted on main - add patch to extract the roam "add" code in a separate function - make the "simplify NEW flag transition code" patch independent of atomic_t code - Link to v1: https://patch.msgid.link/[email protected] To: [email protected] --- Sven Eckelmann (8): batman-adv: tt: remove only the entry which was looked up from the hash batman-adv: tt: extract code handling a roam on add batman-adv: tt: simplify NEW flag transition code batman-adv: tt: drop unnecessary cleanup goto in helpers batman-adv: tt: use protected flag modifications batman-adv: tt: transition NEW local entries only under lock batman-adv: tt: don't uncount never committed clients on pending purge batman-adv: tt: decrement count for committed client on local_remove net/batman-adv/translation-table.c | 487 +++++++++++++++++++++++++------------ net/batman-adv/types.h | 8 +- 2 files changed, 340 insertions(+), 155 deletions(-) --- base-commit: 46e983472304d8875436a23ccb996ea18856081a change-id: 20260730-tt-fixes-fca2b722ebbd Best regards, -- Sven Eckelmann <[email protected]>