Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4635738pxj; Tue, 22 Jun 2021 04:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyh5sHShYoZ3rhCAI1TgaN7RwQR87GKeXvoW9VxDD3szbJFYHKSj/xbQ+j8RgVm4IjQfyg X-Received: by 2002:a5d:9cc8:: with SMTP id w8mr80089iow.100.1624362830103; Tue, 22 Jun 2021 04:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624362830; cv=none; d=google.com; s=arc-20160816; b=rp4b0WPSltaIlzezFMZ+7TBDU53g8NAuNvkN4+pLpJ0EQmyBsjTMaA3YwnwSqhnVOR I2BMLTkpgtcaO+dDWCg5mk1tuPJnbama/XKKfJKrRBjuAD5+TOeHLsdWHstvNJXK3Io1 XQOEEQvO0ubLRi/Y1N5R1r22yvbqGKX1Kt1majRTiKR3WS7Tt9u7dRZpSEDFTQGeFkWB lwUo/mQLctz7P6lnRDuQF2l80xuMHCw24fPkS6MYiX3AVs4mtXi8vfGqSG1qc96EyJcd yIhCZSNBosBt0YTFtG4Hw1PsbOOEN3rpbfk+10QXDG2rZEsZJ+E1q7ZdWHdJMYps8h4z yWPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:date:message-id:from:references:to:subject :dkim-signature; bh=6t6G4Zoh7qcGpc397pR8Tj4sw4Hys37exwTKkL64fG4=; b=Sap7zFlF0t377AMjZHVQoQB4D/j3Y0fIGJ3ykZcybeB0GVU5d3UWZGkC3poFoH4YCc q2L4dg9jdpOYVo/Gs1mvQreVY5VtR7YiKfIQ+M3WeXrEi0u0cwDD5XLf1XJ0rTzt6R3P Zdowpzh/I2nmTm7xLdrifbPvdOh2tu2IbZJfR+ZRdEzH0evKmFYlp7KiLDk/hQnVXgwx kMYpSDGCnY6UHUuAYYeBTHGKDqzJiH2VhPrvXuUEP6fI1Ky3MWd5PTqg8WKN84O2aFvW NJwkQo/bj6GgwerO3uVal3j4j26tjYqbCtK93jaw4WMZumIDHRRr7CHXrd9HT/ijpLFw cLaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=d3xweTUo; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si7983970ilk.157.2021.06.22.04.53.35; Tue, 22 Jun 2021 04:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=d3xweTUo; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbhFVLzm (ORCPT + 99 others); Tue, 22 Jun 2021 07:55:42 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35819 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbhFVLzl (ORCPT ); Tue, 22 Jun 2021 07:55:41 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7A536240028 for ; Tue, 22 Jun 2021 13:53:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1624362802; bh=t0lan+G/Ri4bMVejxIhHr7k0M8H1Ha2uz1hwW75+vvk=; h=Subject:To:From:Date:From; b=d3xweTUoCTAJboAnzSYKQsMyn1+EQtcv/rgYOrHv8JwEo+4dStbpvSsRB9PGinR/l DmWGy4UowJpDa2tyo2AL3MIUGlLbAU1FokXIGBBq3tsYuOJFhy767FQ0il3l31LRYg T4xSngU56xnDHNqs19bGIERFseA2jCBhSK5gQFqVSSL2Bpva9HsXyXSqPCTNGNWOnO f0wMqtsU8DzUvVUIWFJHdcPeAZsFjePX2/AUtjdaZxQ69nhyXqfrgBf+ivYuYU09ji Ev2ob36ixVehDb1FNUljAJ3jTvvAe+MBjkv/DhFxlqa7lEQCk2+kpb7noVe1Xd/InN fWAsedfb03lRQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4G8Pt96l9Tz9rxL; Tue, 22 Jun 2021 13:53:21 +0200 (CEST) Subject: Re: [Bugreport] ath9k dynack not working/low performance on 5 & 10MHz Bandwidth To: Koen Vandeputte , linux-wireless@vger.kernel.org References: <2ffcf571-7068-c06f-3879-d02eacdc4895@posteo.de> <8a3718e1-e988-c24a-d94f-34ba0f5349f4@citymesh.com> From: Petrosilius Message-ID: <339f7aa7-b7ee-b7a8-2e87-a96634c00a32@posteo.de> Date: Tue, 22 Jun 2021 11:53:21 +0000 MIME-Version: 1.0 In-Reply-To: <8a3718e1-e988-c24a-d94f-34ba0f5349f4@citymesh.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 22.06.21 13:52, Koen Vandeputte wrote: > > On 22.06.21 12:12, Petrosilius wrote: >> On 22.06.21 11:54, Koen Vandeputte wrote: >>> On 18.06.21 13:13, Petrosilius wrote: >>>> Hello Lorenzo Bianconi, >>>> >>>> we are running a set of R11e-2HPnD devices and having trouble getting >>>> dynack working properly. >>>> Setup: >>>> * linux-5.4.123 >>>> * OpenWRT (current development branch) with wireless >>>> backports-5.10.34-1 >>>> * distance 2m between ap and sta >>>> * Low ambient noise wifi environment >>>> We experienced some non working dynack or low performance in the >>>> connection due to too high calculated ackto's. >>>> >>>> Here is a ath9k debug output example for a non working dynack @ 10Mhz >>>> BW: >>>> >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.500427] ath: phy0: >>>> {48:8f:5a:3c:bb:03} tx sample 44905341 [dur 8720][h 29-t 30] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.500437] ath: phy0: >>>> ack_ts 44844835 st_ts 44905341 st_dur 8720 [17-29] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.500445] ath: phy0: >>>> ack_ts 44923425 st_ts 44905341 st_dur 8720 [18-29] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.554642] ath: >>>> phy0: rx >>>> sample 44977693 [h 18-t 20] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.554701] ath: phy0: >>>> {48:8f:5a:3c:bb:03} tx sample 44964984 [dur 6032][h 30-t 31] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.554710] ath: phy0: >>>> ack_ts 44923425 st_ts 44964984 st_dur 6032 [18-30] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.554718] ath: phy0: >>>> ack_ts 44977693 st_ts 44964984 st_dur 6032 [19-30] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.577890] ath: >>>> phy0: rx >>>> sample 45000939 [h 19-t 21] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.577946] ath: phy0: >>>> {48:8f:5a:3c:bb:03} tx sample 44998471 [dur 912][h 31-t 32] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.577956] ath: phy0: >>>> ack_ts 44977693 st_ts 44998471 st_dur 912 [19-31] >>>> Wed Jun  2 19:08:50 2021 kern.debug kernel: [  400.577964] ath: phy0: >>>> ack_ts 45000939 st_ts 44998471 st_dur 912 [20-31] >>>> >>>> THe above output is generated in dynack.c by >>>> >>>>           ath_dbg(ath9k_hw_common(ah), DYNACK, >>>>               "ack_ts %u st_ts %u st_dur %u [%u-%u]\n", >>>>               ack_ts, st_ts->tstamp, st_ts->dur, >>>>               da->ack_rbf.h_rb, da->st_rbf.h_rb); >>>> >>>> The ackto is afterwards calculated by >>>> >>>>           if (ack_ts > st_ts->tstamp + st_ts->dur) { >>>>               ackto = ack_ts - st_ts->tstamp - st_ts->dur; >>>> >>>> Filling in the values of the first sample: >>>> >>>> (ack_ts > st_ts->tstamp + st_ts->dur) ? >>>> (44844835 > 44905341+8720) ? >>>> (44844835 > 44914061) ? ... not given >>>> >>>> Therefore a new ackto is not calculated and i can also see that in the >>>> ack_to file: >>>> >>>> 600 A >>>> 600 A >>>> 600 A >>>> ... >>>> >>>> These look like the default values to me (and do not change), but >>>> ath_dynack_get_max_to() should return 750 A for our 10MHz BW case - >>>> this >>>> looks also suspecious to me. >>>> >>>> For 5 MHz bandwidth there is a ackto calculated (~382 A, looks a >>>> bit too >>>> high to me) but the performance is way below expectation (<1MBit) >>>> For 20 MHz bandwidth there is a ackto calculated (51 A) and the >>>> performance is fitting the expectation. >>>> If you want to take a look at the logs for each of these cases for ap >>>> and sta, you can download them here: >>>> https://cloud.hs-augsburg.de/s/eworxkJoL6JXYzZ >>>> >>>> Did anyone else experience such a behaviour on non 20MHz Channels or >>>> does anyone have an idea on where this behaviour might originate from? >>>> I am not experienced in the ath9k driver code, but a uneducated guess >>>> might be that the ring buffer where the dynack algorithm is taking its >>>> frame-samples from is not behaving as expected for the 5&10MHz case. >>>> >>>> regards, >>>> julian dorner >>> Are you stressing the link? >>> I'll try to simulate this later on >>> >>> Regards, >>> >>> Koen >>> >> Hi Koen, >> >> we didnt stress the link that much. >> >> There was only SSH from the ap to the sta running to get access to >> the sta. >> >> regards, >> >> Julian > > Hi, > > Please retry while sending data over the link (iperf or so) and let me > know the results. :) > > Thanks, > > Koen > Hi Koen, we tried this > For 5 MHz bandwidth there is a ackto calculated (~382 A, looks a bit too > high to me) but the performance is way below expectation (<1MBit) running iperf didnt help on this. Regards, Julian