On 8 May 2013 09:07, Ben Greear <greearb@xxxxxxxxxxxxxxx> wrote: > I think it's good to keep global counters too..otherwise it is going to be > a lot of work to gather per NIC stats, and since you would have to read for > each > station, your stats might not be quite as atomic as they used to be. > > But, I'm fine with adding per-station counters on top of the global > stats. As a reference point, one of my in-progress hacks in FreeBSD is to add some macros to the ath(4) driver to keep per-state and global stats, using the same sample pointers. So, a macro would look like this: ATH_STAT_INC(sc, ath_node, stat_name, 1); * if I've enabled global stat counting, the sc->sc_stats.sc_stat_name stat would be bumped. * if I've enabled node stat counting, the ath_node->an_stats.an_stat_name would be bumped. I have similar ideas with net80211 - right now there's some per-node stats, but lots of stats are per-VAP. I'm going to do the same thing - take the vap and the node as part of the stat macro, and bump the per-node and per-VAP stats. Again, leaving it as a build-time option. I've found both global device / VAP stats _and_ per-node stats equally useful for debugging. They're good for debugging different sets of issues - I use the global stats for figuring out what is breaking things, and I use the per-node stats to try and understand how the AP is "viewing" a particular station, separate from all the other stations currently chatting. Stats are hard. Let's go shopping. :-) Adrian Adrian -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html