From patchwork Wed Mar 7 12:29:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 10263919 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB91A60247 for ; Wed, 7 Mar 2018 12:29:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8289294E7 for ; Wed, 7 Mar 2018 12:29:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC864294E9; Wed, 7 Mar 2018 12:29:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4301B294E7 for ; Wed, 7 Mar 2018 12:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754348AbeCGM3j (ORCPT ); Wed, 7 Mar 2018 07:29:39 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33738 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751234AbeCGM3i (ORCPT ); Wed, 7 Mar 2018 07:29:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB79420CC6; Wed, 7 Mar 2018 12:29:37 +0000 (UTC) Received: from localhost (unknown [10.43.2.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60D25215CDA7; Wed, 7 Mar 2018 12:29:37 +0000 (UTC) Date: Wed, 7 Mar 2018 13:29:35 +0100 From: Stanislaw Gruszka To: Daniel Golle Cc: Enrico Mioso , Tom Psyborg , linux-wireless , Johannes Berg , Arnd Bergmann , John Crispin , Felix Fietkau , Jamie Stuart , Mathias Kresin Subject: Re: ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue...? Message-ID: <20180307122935.GB10584@redhat.com> References: <20180103113540.GA10306@redhat.com> <20180123132234.GC2520@redhat.com> <20180124100316.GB3101@redhat.com> <20180301153006.GJ1233@makrotopia.org> <20180307122701.GA10584@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180307122701.GA10584@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 07 Mar 2018 12:29:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 07 Mar 2018 12:29:37 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sgruszka@redhat.com' RCPT:'' Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I forgot to attach the patches, do it now. On Wed, Mar 07, 2018 at 01:27:01PM +0100, Stanislaw Gruszka wrote: > On Thu, Mar 01, 2018 at 04:30:10PM +0100, Daniel Golle wrote: > > [forwarding to all other involved players] > > > > On Thu, Mar 01, 2018 at 05:50:51PM +0300, Jamie Stuart wrote: > > > Hi Daniel, > > > The driver seems much improved after this fix. > > > > it's about those two > > [PATCH 1/2] rt2x00: pause almost full queue early > > [PATCH 2/2] rt2x00: do not pause queue unconditionally on error path > > > > > Under very heavy load (30 clients downloading multi-GB files from SD card on the server concurrently), wifi dies with errors: > > This is some testbed? Could you share how did you setup such > environment and what are client devices ? > > > > [ 7794.230376] ieee80211 phy0: rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0001, signal=0x010c, type=4 > > This is indicator that HW/FW has a problem. There could be various > reasons for that. One possible I can also observe in my setup,is strange > mishmash of seq on frames which were not acked in BlockACK and > had to be resent. This can happen when many frames are wrongly decoded > (i.e. when there is bad radio condition or we have not correct low level > RF/BBP setup for a Ralink device). To mitigate that problem we can > limit length of agreggeted AMPDU frame. > > I attached two patches which do that. One for RX side second for TX side. > Please check if they make a diffrent. You can also hardcode ba_size = 0 > for those 30 clients setup. > > Note the patches can cause (possibly small) perfromance degradation on > good setups. > > Mathias, could you check them as well and see if they do not cause > performance regression on your device ? Lastly when I changed ba_size > setting, it was a problem on your setup. > > > > Thu Mar 1 16:36:47 2018 kern.err kernel: [ 8702.146403] ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2 > > > Thu Mar 1 16:36:47 2018 kern.err kernel: [ 8702.146403] Please file bug report to http://rt2x00.serialmonkey.com > > > Thu Mar 1 16:36:48 2018 kern.err kernel: [ 8702.288149] ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2 > > > Thu Mar 1 16:36:48 2018 kern.err kernel: [ 8702.288149] Please file bug report to http://rt2x00.serialmonkey.com > > > Thu Mar 1 16:36:48 2018 kern.err kernel: [ 8702.380761] ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2 > > > Thu Mar 1 16:36:48 2018 kern.err kernel: [ 8702.380761] Please file bug report to http://rt2x00.serialmonkey.com > > For those errors I recommend to remove > > 600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch > > patch. Whould be good if OpenWRT developers could apply this patch only > on target where it is really needed, not for all rt2800 devices. > > Thanks > Stanislaw diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c index a2c1ca5c76d1..66377f222300 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c @@ -305,12 +305,13 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0]; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct rt2x00_sta *sta_priv = NULL; - u8 density = 0; + u8 density = 0, ba_size = 0; if (sta) { sta_priv = sta_to_rt2x00_sta(sta); txdesc->u.ht.wcid = sta_priv->wcid; density = sta->ht_cap.ampdu_density; + ba_size = (2 << sta->ht_cap.ampdu_factor) - 1; } /* @@ -357,7 +358,7 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, !(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) { __set_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags); txdesc->u.ht.mpdu_density = density; - txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */ + txdesc->u.ht.ba_size = ba_size; } /* diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index d2c289446c00..e68f7f9d48f8 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -9285,7 +9285,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) spec->ht.cap |= rx_chains << IEEE80211_HT_CAP_RX_STBC_SHIFT; - spec->ht.ampdu_factor = (rx_chains > 1) ? 3 : 2; + spec->ht.ampdu_factor = 0; spec->ht.ampdu_density = 4; spec->ht.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; if (tx_chains != rx_chains) {