batman-adv: tt: use atomic flag modifications
Get series with b4
b4 am [email protected] change-id 20260613-tt-atomic-refactor-9c9b23a413f2Versions newest first
- v2 Latest2 patches 0 repliesNew
- v1 RFC3 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- rebase and drop already merged first fix
- remove RFC prefix
- Link to v1: https://patch.msgid.link/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | batman-adv: tt: use atomic flag modificationsnet/ net/ | +167 | 0 replies | |
| 2/2 | batman-adv: tt: simplify NEW flag transition codenet/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH batadv v2 0/2] batman-adv: tt: use atomic flag modifications
The flags of translation table entries are modified in various places using RMW operations like:
* read flags + add flag + store
* read flags + remove flag + store
These were done without making sure that no other context is doing a similar operation at the same time. If another context does modify the flags then it could happen that a store of the flag modifications is simply lost. This problem can usually be fixed at a later point when the flags are tried to be adjusted again.
To reduce the time the wrong flags are used, it is better to change the u16 flags type to use an atomic_t with its atomic helper to perform these adjustments.
---
Changes in v2:
- rebase and drop already merged first fix
- remove RFC prefix
- Link to v1: https://patch.msgid.link/[email protected]
---
Sven Eckelmann (2):
batman-adv: tt: use atomic flag modifications
batman-adv: tt: simplify NEW flag transition code
net/batman-adv/translation-table.c | 255 +++++++++++++++++++++++-------------- net/batman-adv/types.h | 2 +- 2 files changed, 162 insertions(+), 95 deletions(-)
---
base-commit: 6f34546691685542e30c7f7a3a5612821e917560
change-id: 20260613-tt-atomic-refactor-9c9b23a413f2
Best regards,
Signature · 1 line
Sven Eckelmann <[email protected]>