Search Linux Wireless

Re: [PATCH 2/2] [nl,cfg,mac]80211: Add nl80211 command to get mesh network statistics

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

 



On Tue, 2012-10-09 at 13:27 -0700, Ashok Nagarajan wrote:
> The command NL80211_CMD_GET_MESH_STATS gets the statistical information about
> the mesh network. Currently, the following statistics are provided:
> 
> 1. Mesh forwarded multicast frames
> 2. Mesh forwarded unicast frames
> 3. Mesh total forwarded frames
> 4. Dropped frames due to mesh_ttl == 0
> 5. Dropped frames due to no route found
> 6. Dropped frames due to congestion
> 
> The attibute NL80211_ATTR_MESH_PARAMS enumerates the various mesh statistical
> parameters. A new call back get_mesh_stats() is added. mesh_stats struct is
> moved from mac80211/ieee80211_i.h to net/cfg80211.h.

I'll need to think about this a bit. What I'm thinking:

 * is a new nl80211 command really the same API?
 * should ethtools stats be provided maybe (in addition?)

I think this is probably fine though.


Some additional comments on the patch itself:

> +struct mesh_stats {

That should probably get a cfg80211_ prefix?

> +	u32 fwded_mcast;

Should we change those to u64 while at it, since it's now part of the
userspace API in nl80211?

> +static int ieee80211_get_mesh_stats(struct wiphy *wiphy,
> +				    struct net_device *dev,
> +				    struct mesh_stats *stats)
> +{
> +	struct ieee80211_sub_if_data *sdata;
> +	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> +
> +	memcpy(stats, &sdata->u.mesh.mshstats, sizeof(*stats));

should this provide a way to say "I only have these stats" in case other
people later implement it? OTOH, they can do that when they implement it
and don't have all the stats.

johannes

--
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


[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