From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2.tohojo.dk (mail2.tohojo.dk [77.235.48.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id EEB433B2A0 for ; Mon, 30 May 2016 09:27:09 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail2.tohojo.dk DKIM-Filter: OpenDKIM Filter v2.10.3 mail2.tohojo.dk 1F0D040472 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=201310; t=1464614827; bh=nCrC9mVdjVaGN2hE8DUBXOIstOfqfOymBPveuyq2XA4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VTFlK75e3vuHMveb3TskavdBAmwCYTfDakvmTD1eFpWgVXqshwv+V/6CzNMvf9tAN c9gvgT7heUM3a+fSHUsNYynXdNFeRANRAV0SVuH0QQoPzHwr7T4L++mR4WIE4jdrsY mYh9PEw6Xy+ZrhjV7qSK8khkukMrTWv0A4m72dQ4= Sender: toke@toke.dk Received: by alrua-karlstad.karlstad.toke.dk (Postfix, from userid 1000) id 1D35E74F508; Mon, 30 May 2016 15:27:06 +0200 (CEST) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Michal Kazior Cc: linux-wireless , make-wifi-fast@lists.bufferbloat.net, "ath9k-devel\@lists.ath9k.org" References: <87pos9dj2y.fsf@toke.dk> Date: Mon, 30 May 2016 15:27:06 +0200 In-Reply-To: (Michal Kazior's message of "Mon, 30 May 2016 14:35:37 +0200") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87bn3nvfpx.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Make-wifi-fast] [RFC] ath9k: Measure per-station airtime usage X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 13:27:10 -0000 Michal Kazior writes: >> +void ath_debug_tx_airtime(struct ath_softc *sc, >> + struct ath_node *an, >> + struct ath_tx_status *ts) >> +{ >> + struct ath_airtime_stats *astats; >> + >> + rcu_read_lock(); >> + >> + astats = &an->airtime_stats; >> + astats->tx_airtime += ts->duration; > > I'm not ath9k expert but this seems to be oblivious to tx retries. The > ts->duration is acquired from the last used tx rate for given frame. > Or am I missing something? No, don't think you are. Wasn't sure what exactly that duration field included, but I think you're right that it doesn't factor in retries. > I think you should use ts->ts_rateindex and ts->ts_longretry to factor > in retries (see ath_tx_rc_status). I'll go digging. Thanks, this was exactly the kind of feedback I had hoped for! :) -Toke