[Make-wifi-fast] [PATCH 2/3] iw: Print TXQ statistics for stations and interfaces

Toke Høiland-Jørgensen toke at toke.dk
Mon May 7 17:30:31 EDT 2018



On 7 May 2018 23:21:30 CEST, Johannes Berg <johannes at sipsolutions.net> wrote:
>On Mon, 2018-02-19 at 18:02 +0100, Toke Høiland-Jørgensen wrote:
>> 
>> +	if (header && tid >= 0)
>> +		pos += snprintf(buf, buflen, "\n\t\tTID\tqsz-byt\t"
>> +				"qsz-pkt\tflows\tdrops\tmarks\toverlmt\t"
>> +				"hashcol\ttx-bytes\ttx-packets");
>> +	else if (header)
>> +		pos += snprintf(buf, buflen, "\n\t\tqsz-byt\t"
>> +				"qsz-pkt\tflows\tdrops\tmarks\toverlmt\t"
>> +				"hashcol\ttx-bytes\ttx-packets");
>> +
>> +	if (tid >= 0)
>> +		pos += snprintf(pos, buflen - (pos - buf), "\n\t\t%d", tid);
>> +	else
>> +		pos += snprintf(pos, buflen - (pos - buf), "\n\t");
>> +
>> +	txqinfo = txqstats_info[NL80211_TXQ_STATS_BACKLOG_BYTES];
>> +	if (txqinfo)
>> +		pos += snprintf(pos, buflen - (pos - buf), "\t%u",
>> +				nla_get_u32(txqinfo));
>
>since the header is fixed, shouldn't all of these get an else branch
>that just prints a tab or so?

Ah, right, good point. Didn't think about what would happen if any of the fields were actually omitted. Will fix that as well :)

-Toke


More information about the Make-wifi-fast mailing list