On Mon, Feb 18, 2013 at 07:29:47 -0800, Johannes Berg wrote: > On Mon, 2013-02-18 at 15:46 +0100, Antonio Quartulli wrote: > > > In my current implementation I created a "twin hash-table". It contains > > statistics for *all* the stations (peer and non-peer). > > > > I think that instead of embedding this new struct (let's call it sta_stats) into > > the sta_info one, it would be easier to let them be independent (this is why I > > created the twin hash) and then create > > a pointer from the sta_info to the related sta_stats. > > I don't really see value in that, it would only make the implementation > less efficient, because either you follow another pointer (sta->stats) > or you have to look in the other hash table. That's why I prefer > embedding it, we have to do the station hash table lookup anyway. I did not like this approach because the sta_info struct is so big that when we want to fill the stats substruct only we will waste a lot of bytes. I think this is the usual space vs. time tread-off :). However, since this struct is accessed on the critical path, it may be worth to save time and go for the "embed" approach. Let's see what the other thinks about it.... > > > For the API I think we should create a new nl80211 command. > > If we simply add a > > flag to the normal "station dump" command, we would not have all the attributes > > to print (keep in mind station dump prints attributes that are in sta_info and > > that are not in sta_stats). > > station dump can just print all attributes that exist, some stations > would have more/different attributes than other stations. But I don't > really think it makes a big difference either way, reusing it would be > fine if the default is to not include the stats-only entries. yeah, the default behaviour should remain the same (print peer stations only). Cheers, -- Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara