batman-adv: Add inconsistent nl dump detection
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | batman-adv: Add compat for genl_dump_check_consistentcompat-include/ | +45 | 0 replies | |
| 2/9 | batman-adv: Add inconsistent gateway netlink dump detectionnet/ net/ net/ +2 more | +41 | 0 replies | |
| 3/9 | batman-adv: Add inconsistent hardif netlink dump detectionnet/ net/ net/ +1 more | +19 | 0 replies | |
| 4/9 | batman-adv: Store modification counter via hash helpersnet/ net/ | +8 | 0 replies | |
| 5/9 | batman-adv: Add inconsistent backbone netlink dump detectionnet/ | +23 | 0 replies | |
| 6/9 | batman-adv: Add inconsistent claim netlink dump detectionnet/ | +23 | 0 replies | |
| 7/9 | batman-adv: Add inconsistent dat netlink dump detectionnet/ | +23 | 0 replies | |
| 8/9 | batman-adv: Add inconsistent local TT netlink dump detectionnet/ | +23 | 0 replies | |
| 9/9 | batman-adv: Add inconsistent multicast netlink dump detectionnet/ | +28 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [B.A.T.M.A.N.] [PATCH 0/9] batman-adv: Add inconsistent nl dump detection
The netlink dump functionality transfers a large number of entries from the kernel to userspace. It is rather likely that the transfer has to interrupted and later continued. During that time, it can happen that either new entries are added or removed. The userspace could than either receive some entries multiple times or miss entries.
Commit 670dc2833d14 ("netlink: advertise incomplete dumps") introduced a mechanism to inform userspace about this problem. Userspace can then decide whether it is necessary or not to retry dumping the information again.
The netlink dump functions have to be switched to exclusive locks to avoid changes while the current message is prepared. And an external generation sequence counter is introduced which tracks all modifications of the list/hash.
There some netlink dump commands which were not yet modified. These datastructures use subentries (or entries for multiple main object) which makes mapping to a generation sequence counter more problematic:
* originator
* neighbor list (multiple interfaces make it harder)
* global translation table
Also the batadv_algo stuff was ignored because it doesn't even have locks and is not supposed to be modified at runtime.
Kind regards,
Sven
Sven Eckelmann (9):
batman-adv: Add compat for genl_dump_check_consistent
batman-adv: Add inconsistent gateway netlink dump detection
batman-adv: Add inconsistent hardif netlink dump detection
batman-adv: Store modification counter via hash helpers
batman-adv: Add inconsistent backbone netlink dump detection
batman-adv: Add inconsistent claim netlink dump detection
batman-adv: Add inconsistent dat netlink dump detection
batman-adv: Add inconsistent local TT netlink dump detection
batman-adv: Add inconsistent multicast netlink dump detection
compat-include/net/genetlink.h | 45 ++++++++++++++ net/batman-adv/bat_iv_ogm.c | 24 +++++--- net/batman-adv/bat_v.c | 26 +++++--- net/batman-adv/bridge_loop_avoidance.c | 82 +++++++++++++++----------- net/batman-adv/distributed-arp-table.c | 42 +++++++------ net/batman-adv/gateway_client.c | 3 + net/batman-adv/hard-interface.c | 3 + net/batman-adv/hash.c | 2 + net/batman-adv/hash.h | 6 ++ net/batman-adv/main.c | 3 + net/batman-adv/main.h | 1 + net/batman-adv/multicast.c | 51 ++++++++-------- net/batman-adv/netlink.c | 24 ++++---- net/batman-adv/translation-table.c | 41 +++++++------ net/batman-adv/types.h | 5 +- 15 files changed, 233 insertions(+), 125 deletions(-) create mode 100644 compat-include/net/genetlink.h
Signature · 1 line
2.19.1