Skip to content
Snippets Groups Projects

Use timer to remove stale STAs

Merged Filip Matusiak requested to merge filmat/devel-17125 into devel

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

Merge request pipeline #211016 passed

Merge request pipeline passed for 7c783545

Approval is optional

Merged by Filip MatusiakFilip Matusiak 1 week ago (Jun 11, 2025 1:42pm UTC)

Merge details

  • Changes merged into devel with 7c783545.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #211017 passed

Pipeline passed for 7c783545 on devel

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Anjan Chanda
  • Filip Matusiak added 10 commits

    added 10 commits

    Compare with previous version

    • 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:~#
  • Can you add a short description to the MR to explain what issue is being addressed?

  • Filip Matusiak changed the description

    changed the description

  • Filip Matusiak added 1 commit

    added 1 commit

    • 673a835a - stalist: leverage use of connection time

    Compare with previous version

  • Filip Matusiak added 3 commits

    added 3 commits

    • 85c900d2 - 1 commit from branch devel
    • 0a7b9798 - update node's stalist from Topology Response
    • 504552ec - Use timer to remove stale clients

    Compare with previous version

  • Filip Matusiak resolved all threads

    resolved all threads

  • Filip Matusiak added 4 commits

    added 4 commits

    Compare with previous version

  • Filip Matusiak changed the description

    changed the description

  • Filip Matusiak added 3 commits

    added 3 commits

    • a0a22555 - 1 commit from branch devel
    • e4c6ff69 - update node's stalist from Topology Response
    • db84e9e4 - Use timer to remove stale clients

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading