All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/7] wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station
@ 2025-01-10  4:24 Sarika Sharma
  2025-01-10  4:24 ` [PATCH RFC 1/7] wifi: cfg80211: reorg sinfo structure elements for mesh Sarika Sharma
                   ` (8 more replies)
  0 siblings, 9 replies; 28+ messages in thread
From: Sarika Sharma @ 2025-01-10  4:24 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Sarika Sharma

Current implementation of NL80211_CMD_GET_STATION does not work
for multi-link operation(MLO) since in case of MLO only deflink
(or one of the links) is considered and not all links.

Hence, add the link_sinfo structure to provide infrastructure
for link-level station statistics for multi-link operation(MLO).

Additionally, accumulated stats for MLO are included in a concise
manner to provide a comprehensive overview of the ML stations.

NOTE:
   1. Current code changes are done to get an early feedback on design.
   2. Once RFC patches are approved will add the required driver changes.
   3. Ath12k changes are included in this series for reference to other
      driver changes.

Current flow:

      +-------------------------+                                            
      |      From userspace -   |                                            
      | NL80211_CMD_GET_STATION |                                            
      |                         |                                            
      +-------------------------+                                            
                   |                                                         
                   |                                                         
 +---------------------------------------+                                   
 |        nl80211_get_station()          |                                   
 |                                       |                                   
 | 1. Locally define sinfo               |                                   
 | 2. call cfg80211 ops - .get_station() |                                   
 +---------------------------------------+                                   
                    |                                                        
                    |                                                         
+-------------------------------------------+                                
|          sta_set_sinfo()                  |                                
| 1. call mac80211 ops - .sta_statistics()  |                                
|    to fill sinfo structure                |                                
| 2. fill remaining sinfo structure, if     |                                
|    not filled from driver                 |                                
+-------------------------------------------+  


Proposed flow: (Changes in last block)

      +-------------------------+                                            
      |      From userspace -   |                                            
      | NL80211_CMD_GET_STATION |                                            
      |                         |                                            
      +-------------------------+                                            
                   |                                                         
                   |                                                         
 +---------------------------------------+                                   
 |        nl80211_get_station()          |                                   
 |                                       |                                   
 | 1. Locally define sinfo               |                                   
 | 2. call cfg80211 ops - .get_station() |                                   
 +---------------------------------------+ 
                   |
                   |
 +----------------------------------------------------------+
 |                 sta_set_sinfo()                          |
 |   1. fill sinfo structure- info related to station       |
 |   2. if MLO                                              |
 |      a. call sta_set_link_sinfo() for each valid link    |
 |         i. Call mac80211 ops- .link_sta_statistics()     |
 |            to fill link_sinfo structure                  |
 |         ii. fill remaining link_sinfo structure          |
 |      b. call sta_set_mld_info()- to fill accumulated     |
 |         stats at MLO level                               |
 |   3. if non-ML                                           |
 |      a. call sta_set_link_sinfo() for deflink            |
 |         i. Call mac80211 ops - .link_sta_statistics()    |
 |            to fill deflink link_sinfo structure          |
 |         ii. fill remaining link_sinfo structure          |
 +----------------------------------------------------------+

Alternate approach:
   - Keep sinfo structure as it is and use this for non-ML or
     accumulated statistics for ML station.
   - Add link sinfo for links with only certain link specific statistics.
   - Keep mac_op_sta_statistics at MLD level and let driver fill the
     MLO and link level data, if driver not filling let mac80211 fill
     the data.
   - Corresponding changes done to embed statistics into the NL message
     based on the sinfo/link_sinfo.
	 
pseudo code for alternate approach:

 - cfg80211/mac80211:
	structure sinfo {
	filled
	packets
	bytes
	etc... //retain the structure as it was there before
	add structure link_sinfo{
		filled
		packets
		bytes
		etc ... //all link level applicable fields
		}
	}
 - Call drv_sta_statistics at MLO level or deflink if non-ML and let
   driver fill MLO statistics and link level statistics.
 - Check if sinfo->filled is set if not fill the corresponding data
   in sinfo and link sinfo for MLO or sinfo for non-ML.

Why not considered this approach for implementation:

 - The required changes here to other drivers are minimal. However,
   since sinfo is retained, every field needs to be filled at the MLO
   level. MLO statistics for tx_duration, pertid, etc., may not be
   very useful.
 - If these elements are not filled for MLO, they will remain unused
   in sinfo.

Sarika Sharma (7):
  wifi: cfg80211: reorg sinfo structure elements for mesh
  wifi: cfg80211: reorg sinfo structure elements for MLO
  wifi: cfg80211: extend statistics for link level in sinfo
  wifi: cfg80211: add accumulated statistics for MLO links
  wifi: mac80211: add support to accumulate removed link statistics
  wifi: cfg80211: add additional MLO statistics
  wifi: ath12k: correctly fetch arsta for MLO

 drivers/net/wireless/ath/ath12k/mac.c |  51 +--
 include/net/cfg80211.h                | 204 ++++++----
 include/net/mac80211.h                |  21 +-
 net/mac80211/driver-ops.h             |  14 +-
 net/mac80211/ethtool.c                |  30 +-
 net/mac80211/ibss.c                   |   4 +-
 net/mac80211/sta_info.c               | 537 ++++++++++++++++++--------
 net/mac80211/sta_info.h               |  30 +-
 net/mac80211/trace.h                  |   2 +-
 net/mac80211/util.c                   |  18 +-
 net/wireless/nl80211.c                | 353 +++++++++++------
 net/wireless/trace.h                  |  33 +-
 net/wireless/util.c                   |  10 +-
 net/wireless/wext-compat.c            |  22 +-
 14 files changed, 889 insertions(+), 440 deletions(-)


base-commit: 7bf1659bad4e9413cdba132ef9cbd0caa9cabcc4
-- 
2.34.1


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-01-15 17:02 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10  4:24 [PATCH RFC 0/7] wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station Sarika Sharma
2025-01-10  4:24 ` [PATCH RFC 1/7] wifi: cfg80211: reorg sinfo structure elements for mesh Sarika Sharma
2025-01-10  9:15   ` Johannes Berg
2025-01-12  8:08     ` Sarika Sharma
2025-01-10  4:24 ` [PATCH RFC 2/7] wifi: cfg80211: reorg sinfo structure elements for MLO Sarika Sharma
2025-01-10  9:19   ` Johannes Berg
2025-01-12  8:10     ` Sarika Sharma
2025-01-14 11:19       ` Johannes Berg
2025-01-15  6:40         ` Sarika Sharma
2025-01-11  6:51   ` kernel test robot
2025-01-11  7:25   ` kernel test robot
2025-01-10  4:24 ` [PATCH RFC 3/7] wifi: cfg80211: extend statistics for link level in sinfo Sarika Sharma
2025-01-10  9:20   ` Johannes Berg
2025-01-12  8:10     ` Sarika Sharma
2025-01-10  9:21   ` Johannes Berg
2025-01-12  8:14     ` Sarika Sharma
2025-01-11  9:49   ` kernel test robot
2025-01-10  4:24 ` [PATCH RFC 4/7] wifi: cfg80211: add accumulated statistics for MLO links Sarika Sharma
2025-01-10  4:24 ` [PATCH RFC 5/7] wifi: mac80211: add support to accumulate removed link statistics Sarika Sharma
2025-01-10  9:22   ` Johannes Berg
2025-01-12  8:15     ` Sarika Sharma
2025-01-10  4:24 ` [PATCH RFC 6/7] wifi: cfg80211: add additional MLO statistics Sarika Sharma
2025-01-10  4:24 ` [PATCH RFC 7/7] wifi: ath12k: correctly fetch arsta for MLO Sarika Sharma
2025-01-10  9:45 ` [PATCH RFC 0/7] wifi: cfg80211/mac80211: add support to handle per link statistics of multi-link station Johannes Berg
2025-01-12  8:17   ` Sarika Sharma
2025-01-10 16:53 ` Ben Greear
2025-01-15  5:11   ` Sarika Sharma
2025-01-15 17:02     ` Ben Greear

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.