[PATCH batadv v2 0/9] batman-adv: tp_meter: unacked list/state fixes and optimization
Sven Eckelmann <[email protected]> Thu, 11 Jun 2026 19:24:05 +0200
| Newsgroups | org.open-mesh.lists.batman |
|---|---|
| Message-ID | <[email protected]> |
As we all know, after the tp_meter fix is before the tp_meter fix. I've
started to go through some of the problems in the receiver code and noticed
even more things which were real bugs and some things which required
cleanup/optimization:
* limit the number of entries in the unacked list
- using an actual limit
- by avoiding (merging) new entries when adjacent to an older (smaller seqno) one
- by merging with newer (smaller seqno) entries in case a recently
received one closed a gap in the seqnos
* concurrency problems
- fix next Ack packet seqno corruption due to missing locking of RMW
operations
- avoid compiler induced data races when handling last_recv_time
* various code cleanups
Signed-off-by: Sven Eckelmann <[email protected]>
---
Changes in v2:
- rebased
- add "delay allocation of unacked entry"
- add "adjust name of receiver lock"
- add "combine adjacent/overlapping unacked entries"
- add "simplify unordered ack calculation"
- add "handle overlapping packets"
- add "prevent parallel modifications of last_recv"
- add "annotate last_recv_time access with READ/WRITE_ONCE"
- Link to v1: https://patch.msgid.link/[email protected]
To: [email protected]
---
Sven Eckelmann (9):
batman-adv: tp_meter: restrict number of unacked list entries
batman-adv: tp_meter: annotate last_recv_time access with READ/WRITE_ONCE
batman-adv: tp_meter: prevent parallel modifications of last_recv
batman-adv: tp_meter: handle overlapping packets
batman-adv: tp_meter: simplify unordered ack calculation
batman-adv: tp_meter: combine adjacent/overlapping unacked entries
batman-adv: tp_meter: keep unacked list for receivers
batman-adv: tp_meter: adjust name of receiver lock
batman-adv: tp_meter: delay allocation of unacked entry
net/batman-adv/tp_meter.c | 255 +++++++++++++++++++++++++++++-----------------
net/batman-adv/types.h | 19 ++--
2 files changed, 174 insertions(+), 100 deletions(-)
---
base-commit: 385b248dd4e46c4ce022adeb1b13e547d1954901
change-id: 20260610-tp-unacked-list-d6ba9d0117e5
Best regards,
--
Sven Eckelmann <[email protected]>