From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id EA0CF3B25E for ; Fri, 10 Jun 2016 04:40:50 -0400 (EDT) Received: by mail-wm0-x22d.google.com with SMTP id n184so256938385wmn.1 for ; Fri, 10 Jun 2016 01:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bm3IDd5iLOS6jp9UVICQfN9e4xOfv7Q9ANFlCThTFgA=; b=zLWH8YTq5SBxTAMicPgeuQQnHX4pvHUe6owabTs0+wwq2gp7Uv32BCF78BVNNdUzhT 7FTErSE+KiuIdOaxe19SGsIzFmfe48kreJr8mr1kT5i5M0SS+ZrB6N4K7R57rkk4Av2n bvfFyOy6yKlVW9Z3L4tBRBU/SU/zySunxaioA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bm3IDd5iLOS6jp9UVICQfN9e4xOfv7Q9ANFlCThTFgA=; b=GKaVDjwUWAOceGaMMQk38WcFPwIpDNIKY7Io7RUs/GILP9fM5y+Zk11wCXpwU3EA2Z iQDsw476/0BZtGVuvFnB/3S7eVDz3WSz0DC5tbtO9MfIcugyjZXdhg6DmIBXUApgK5Ux jbZ+ij5NhZd5eS0h9Y1xKxlPPz1A3nlx1egaMADguHye6cus9ZohtcY4m4f1Ybsd8lzz RpT5ddCfC53IoBwARrhP/a6nRPEvpvi7fnT1ripFJ97yqIKd30/Zu2cSjynO7BMEiELd ZGbIFcoyJmDrTixTRTnIaMV415248glivPHFXgTqy1qthDTId24fR8+Kx6RLkRJoFec0 qXLg== X-Gm-Message-State: ALyK8tK+6nN1yv5pqO37xXcEfdEaQmQcF8x4t9fAixxokBawn0aCaqkmS4038I3C69iV85ZlvD4Sv0F6buTDvD9dnIpMzH6D0vSwHX7pJo4gT/l2VN+XfZPkiBs+9/EjU6PuxlwYI7UHnr++n4s8ZlJMFFBrDDY+3JGYQg== X-Received: by 10.194.81.72 with SMTP id y8mr1009230wjx.83.1465548049763; Fri, 10 Jun 2016 01:40:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.26.36 with HTTP; Fri, 10 Jun 2016 01:40:49 -0700 (PDT) In-Reply-To: <87wpm1b6bu.fsf@toke.dk> References: <20160603165144.17356-1-toke@toke.dk> <20160603165144.17356-6-toke@toke.dk> <8737orucq4.fsf@toke.dk> <87k2i1ml43.fsf@toke.dk> <87wpm1b6bu.fsf@toke.dk> From: Michal Kazior Date: Fri, 10 Jun 2016 10:40:49 +0200 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Adrian Chadd , make-wifi-fast@lists.bufferbloat.net, ath9k-devel , "linux-wireless@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-DomainID: tieto.com Subject: Re: [Make-wifi-fast] [RFC/RFT 5/5] ath9k: Count RX airtime in airtime deficit 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: Fri, 10 Jun 2016 08:40:51 -0000 On 7 June 2016 at 13:12, Toke H=C3=B8iland-J=C3=B8rgensen wr= ote: > Toke H=C3=B8iland-J=C3=B8rgensen writes: > >>> [snip] >>> >>> I also found one of my notes in my version of this - how can we >>> estimate the duration of an A-MPDU, when we only get hardware >>> de-encapsulated frames? >> >> Well in my case I'm sidestepping this by getting the TX duration from >> a register in the hardware. There seems to be registers containing the >> duration spent on each step in the retry chain; I simply sum these. > > Ah, but you're still talking RX? Hmm, I'm using ath_pkt_duration() to > compute the RX time, which does take into account MIMO (I think) but > expects the size to include padding. Which is probably not included in > the rs_datalen field of struct ath_rx_status that I'm using. > > So yeah, how to account for that? > > I initially thought that using the timestamp put into the frame by the > hardware could be a way to get timing. But there's only a timestamp of > the first symbol in rs_tstamp, and getting a time to compare it with is > difficult; by the time the frame is handled in the rx tasklet, way too > much time has been spent on interrupt handling etc for the current time > to be worth comparing with. I think rs_tstamp in rx-status is different for first MPDU and last MPDU in an A-MPDU meaning you should be able to compute the entire duration (if you track it, and this should be fairly straightforward as you can't really rx interleaved MPDUs from different A-MPDUs/stations). I'm not sure if the last MPDU defines the tstamp of first symbol or last one. Micha=C5=82