Search Linux Wireless

Re: [RFC] design discussion: Collecting information for (non-peer) stations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 18, 2013 at 05:51:42PM +0100, Johannes Berg wrote:
> On Mon, 2013-02-18 at 17:07 +0100, Antonio Quartulli wrote:
> > On Mon, Feb 18, 2013 at 07:58:18 -0800, Johannes Berg wrote:
> > > On Mon, 2013-02-18 at 16:49 +0100, Antonio Quartulli wrote:
> > > > On Mon, Feb 18, 2013 at 07:43:26 -0800, Johannes Berg wrote:
> > > > > > 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 don't understand your point.
> > > > > 
> > > > > struct sta_info {
> > > > >    ...
> > > > >    struct stats stats;
> > > > > };
> > > > 
> > > > My concern is about those "..." that we are allocating within the sta_info struct
> > > > that we will never use for every non-peer station.
> > > > 
> > > > While if we used the struct below (with its own hash table), we would allocate
> > > > only the space needed for the stats.
> > > > 
> > > > > 
> > > > > struct stats_entry {
> > > > >    struct hash/list/whatever;
> > > > >    struct stats stats;
> > > > > };
> > > > > 
> > > > 
> > > > 
> > > > no?
> > > > Maybe I misunderstood your idea?
> > > 
> > > But I'm not saying that these are mutually exclusive, I'm saying both
> > > should exist.
> > 
> > Ah ok..Sorry, but I did not take this as an option :)
> > 
> > So, if I understood correctly, this means one table lookup for peer stations,
> > while two table lookups for non peers (first in sta_hash, which will fail). Right?
> > 
> > This would save one look up for each peer, since we have to do perform one of
> > them anyway (now I fully understood your previous statement!).
> 
> Right... But the failing sta lookup has to happen anyway, so it really
> adds practically no cost in the peer case, and a singe lookup in the
> "non-peer already exists" case.

To sum from this discussion (I think it's a good idea):

 * embed the stats_entry into the sta_info
 * update peer-stats by modifying the embedded stats_entry (we do the lookup anyway
 * keep the non-peer stats in a seperate hash, and only keep stats_entry for them (we don't need
   the full sta_info after all).

We should consider some corner cases here, e.g. adding stas, then we have to
copy+remove the stats from the non-peer hash, or removing stas, then we have
to copy the so-far collected stats to the non-peer hash.

If you are okay with it, we can use the NL80211_CMD_GET_STATION command
(as in iw station dump), and add a seperate flag to give info for non-peer sta.

What about the other commands I suggested (read+reset, start, stop)? For read+reset,
we could just send yet another flag (RESET_STATS) with the GET_STATION command, but
for start/stop we would need new commands? Or would you have any better idea?

@Thomas: Is there anything to consider for 802.11s?

Thanks for your input,
	Simon

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux