Search Linux Wireless

Re: [PATCH] mac80211: provide race-free 64-bit traffic counters

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

 



On Mon, 2013-03-04 at 09:12 -0800, Ben Greear wrote:

[please trim quotes before and after the part you're replying to]

> >   	sinfo->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx);
> > +	sinfo->tx_bytes = 0;
> > +	sinfo->tx_packets = 0;
> > +	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
> > +		sinfo->tx_bytes += sta->tx_bytes[ac];
> > +		sinfo->tx_packets += sta->tx_packets[ac];
> > +	}
> 
> I think you'll need tx_packets to be u64 as well, as otherwise
> if a queue wraps it's going to be quite hard to figure out?

Hmm, that's a good question. I guess I figured it'd never overflow
anyway, but it seems that it is actually possible. I'll change it.

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