Use timer to remove stale STAs
This MR is aming at fixing high CPU usage of mapcontroller due to corrupted node->stalist.
There're couple of issues,
- one being periodically (every second) checking for inactive STAs to delete which is CPU consuming, as there're couple of recursive for loops used (every second).
- other is the possiblity for the node->stalist and ctrl->sta_table to go out of sync, causing indefinite for loops triggered from the above periodic run, due to improper removal of the sta (remove only from active node, but left over pointer on another node's stalist)
The fix is to add per-sta timer - each sta monitors it's state separately, and removes itself from the node->stalist of all nodes and ctrl->sta_table after connectivity timeout. The timer is initiated on any disassociated and cleared on associated trigger (event/notification).
Edited by Filip Matusiak
Merge request reports
Activity
requested review from @anjancx
assigned to @filmat
- Resolved by Filip Matusiak
- Resolved by Filip Matusiak
added 10 commits
-
f3d5ee65...ca695700 - 9 commits from branch
devel
- 80731294 - Use timer to remove stale clients
-
f3d5ee65...ca695700 - 9 commits from branch
- Resolved by Filip Matusiak
BTW when switch wifi -> eth backhaul - still see 1905 station connected. Maybe we should also trigger cleanup when change bhaul type (for 1905 stations).
{ "macaddr": "b0:dd:74:b2:c7:52", "bssid": "ba:00:32:ee:a4:e0", "type": "IEEE1905", "associated": true, "conntime": 7681, "assoc_time": "2025-06-09T09:01:57+0000", "disassoc_time": "", "disassoc_reason": 0, "time_delta": 905, "dl_rate": 286000, "ul_rate": 258000, "dl_utilization": 0, "ul_utilization": 0, "dl_est_thput": 133, "ul_est_thput": 133, "ul_rcpi": 140, "reassoc_frame": "0000000000134d41502d4230444437344232393330302d424801080c1218243048606c21020013302a0100000fac040100000fac040100000fac08c00001008dd18968d2f20deb57bc22738b59c72d000fac062d1aff0917ffff0000000000000000000001000000000000000000007f0b00004a0201404040000120ff1c230108001a40002270ce126d00f30e4e3f00fafffaff391cc7711c07460570000000003b0451515354dd070050f202000100dd09506f9a160200030103dd07506f9a1b060180", "meas_reportlist": [ ] },
root@heimgard-9300:~# ubus call map.controller dump_topology { { "alid": "b2:dd:74:b2:93:00", "hostname": "heimgard-9300", "2g": "11/20", "5g": "104/80", "leafs": [ { "alid": "5a:00:32:ee:a4:e0", "hostname": "Pulse-EX600-580032eea4e0", "media": "Ethernet (802_3AB_GIGABIT_ETHERNET)", "5g": "100/80", "2g": "6/20", "leafs": [ { "alid": "8a:46:f2:36:2b:02", "hostname": "bpi-r3-8a46f2362b02", "media": "Wi-Fi (802_11AX)", "2g": "6/20", "5g": "100/80 uplink" } ] }, { "alid": "b2:dd:74:b2:c7:50", "hostname": "heimgard-C750", "media": "Ethernet (802_3AB_GIGABIT_ETHERNET)", "2g": "6/20 uplink", "5g": "104/80" } ] } } root@heimgard-9300:~#
added 4 commits
-
504552ec...ead2703e - 2 commits from branch
devel
- 522175f9 - update node's stalist from Topology Response
- 9947bda1 - Use timer to remove stale clients
-
504552ec...ead2703e - 2 commits from branch
- Resolved by Filip Matusiak
- Resolved by Filip Matusiak
- Resolved by Filip Matusiak
Please register or sign in to reply