batman-adv: tt: atomic sashiko fixes
Get series with b4
b4 am [email protected] change-id 20260730-tt-fixes-fca2b722ebbdVersions newest first
- v6 Latest20 patches 0 repliesNew
- v520 patches 0 repliesSuperseded
- v4 RFC8 patches 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 RFC | 6 patches | 1 reply | Superseded | |
| v2 | 6 patches | 0 replies | Superseded | |
| v1 | 4 patches | 0 replies | Superseded |
Changes in v6 from the cover letter
- keep roam_at access always in locked region
- use WRITE_ONCE/READ_ONCE to reduec number of times we need to use a lock for a simple read
- drop flag modification from kernel-doc of batadv_tt_local_set_pending_event
- document special case when batadv_tt_local_size_dec can be called without the hash list lock held
- Link to v5: https://patch.msgid.link/[email protected]
Patches in v6 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH batadv v6 00/20] batman-adv: tt: atomic sashiko fixes
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").
This version of the patchset also includes the cleanups and swithches to scoped_guards (when appropriate). The original cover letter was:
While working on the flag protection changes, it became apparent that the current code is hard to maintain. Too many gotos with large sections which are hard to crasp; because it is unclear how these sections are interact. To simplify everything, sections which are handling a single task are extracted in separate functions. This makes it cleared what the input and output of each "section" are.
---
Changes in v6:
- keep roam_at access always in locked region
- use WRITE_ONCE/READ_ONCE to reduec number of times we need to use a lock for a simple read
- drop flag modification from kernel-doc of batadv_tt_local_set_pending_event
- document special case when batadv_tt_local_size_dec can be called without the hash list lock held
- Link to v5: https://patch.msgid.link/[email protected]
Changes in v5:
- keep all batadv_tt_flags_get changes to "batman-adv: tt: use protected flag modifications"
- remove to non-RCU iterator in batadv_tt_local_transition_new() after switching to locked iteration
- remove RFC patch prefix
- integrate the cleanup patches which depend on this patchset
- Link to v4: https://patch.msgid.link/[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]
---
Sven Eckelmann (20):
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
batman-adv: tt: look up wifi state of incoming interface in helper
batman-adv: tt: extract allocation of new local entries
batman-adv: tt: replace forward gotos in batadv_tt_local_add()
batman-adv: tt: extract refresh of existing local entries
batman-adv: tt: extract update of dynamic client flags
batman-adv: tt: extract allocation of new global entries
batman-adv: tt: extract merging of flags into existing global entries
batman-adv: tt: replace add_orig_entry goto in batadv_tt_global_add()
batman-adv: tt: extract removal of the superseded local entry
batman-adv: tt: extract marking of a removed local entry
batman-adv: tt: extract immediate purge of a local entry
batman-adv: tt: drop the cleanup label from batadv_tt_local_remove()
net/batman-adv/translation-table.c | 1113 ++++++++++++++++++++++++------------ net/batman-adv/types.h | 11 +- 2 files changed, 747 insertions(+), 377 deletions(-)
---
base-commit: f3c33e7fcb7e88cc099b783faf26f0494b774571
change-id: 20260730-tt-fixes-fca2b722ebbd
Best regards,
Signature · 1 line
Sven Eckelmann <[email protected]>