Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp876086pxf; Wed, 7 Apr 2021 13:55:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvlKgzY7QtWAEf0qIc8v9y1K64l8SMCl4pZyoNNg51gV5lwh3kpBX4/slvf4rcnaSpZY33 X-Received: by 2002:a17:906:ce32:: with SMTP id sd18mr6017799ejb.85.1617828917426; Wed, 07 Apr 2021 13:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617828917; cv=none; d=google.com; s=arc-20160816; b=psyyl8Junu+fUpLAoTZWcxt7bMzI3q8jhKEB+1CfTPTqV4L9DjAhcufhWqLGavxSzn tFlNB7aClfUXEM/dCrm9/17LT0nYEnTEGlffUpKucLJG/RAdARtr1/83yiEp+JT1AT5x IJtVoHJYKb4tr1teS/4yZt95M8SDVrsaiCVm96aJTZvd6oJZUtzmaI+s2d2AqmcJXpSk XGSkwNaZOtIJsVyzSDtRXGlXjERw1c6ukX0M1w4oUUg0zO7bOBKosdq7EFesK22bOZp7 fTC/TWCdbhwuPTiskiKeiOGzURlXfd9nIFl28y7peHM37wdqy+/QhMiwwLV1ryq0+M9X wYTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DMyziVDGTjJrGpFoz0I8z3Cmbfjn4r/vFrjIybJqICI=; b=A+t5myguOZAFKd0tVXoVAAcCKq8ID5BFnig3NTyAWS0S93wFSJSwTLiFij+2a7sfZm xFAosR2Ia2hC8JE1zbOMFQb0pvkaxde4buVTCPoQm2zMya/BmStR3ARmJDe/6BDkOJ/B W5Xyds7LlU815gY5a4pNw1FsLr99H5IpI03SqPmNDMkMG8ijpRVpZ+DIvLY2dzdwBvkw I8YKdm0t8F85htFytvYRzyLEz2JPfMTLRv9gv8gX1+ZbZ6vljrBq9qdlSUX2MZpDKq4k iGWrtGpWQAWNrNgjqdXFNdx/hmXSbgzDjI3liR+FF2VZC8oPwNqrrKiKntr+mhFDELyj Rg6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E3YcruaO; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs2si20395576ejc.566.2021.04.07.13.54.54; Wed, 07 Apr 2021 13:55:17 -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=@kernel.org header.s=k20201202 header.b=E3YcruaO; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235002AbhDGKyD (ORCPT + 99 others); Wed, 7 Apr 2021 06:54:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:56942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237153AbhDGKx4 (ORCPT ); Wed, 7 Apr 2021 06:53:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D5406139C; Wed, 7 Apr 2021 10:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617792826; bh=hFN/o0QEdMOAnnNIDsz27FSmPvKA2meADcDNCydIOFM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E3YcruaOFxI5PmqU+yUxbRtAoCq7Yf9QOU7f44t8NaRa0ANudAM8Zehh3xguPSIJi m9RxWKY2ZY67yh4lv9rwyVn+8XmLR67+VCJE+5N2x3N1RXwga8uG8Du3hcJwrqMDX8 I4Q0IVbVGd8f0+OWYz8gLEDCqPkpAVlqP3D6xqzujBxmmccKESLV8pGhnnvahJnH1k KC0F4jwph888RmDH2B/jMgvEjPbflxaL4TXoqeOIzBoBgOPpdf+gNq73lDrobu+cpT w6oOB0KO3uBkuqlwivs3iXsbjShGKghz883dv5iFNqaUhvuyJ8KWHjGgL2Zx07R13G okKYB82oNL78g== Date: Wed, 7 Apr 2021 12:53:42 +0200 From: Lorenzo Bianconi To: Felix Fietkau Cc: linux-wireless@vger.kernel.org Subject: Re: [PATCH] mt76: fix rx amsdu subframe processing Message-ID: References: <20210406182235.14377-1-nbd@nbd.name> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KL28bWGfPXz2IigD" Content-Disposition: inline In-Reply-To: <20210406182235.14377-1-nbd@nbd.name> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --KL28bWGfPXz2IigD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > When receiving an A-MSDU containing only a single subframe, status->last_= amsdu > is set, but no previous head is present in the rx A-MSDU queue. > In this case, the A-MSDU subframe will be held until the next one is rece= ived, > potentially causing significant extra latency. > Fix this by releasing the frame instead of creating a new queue head if > last_amsdu is set. Acked-by: Lorenzo Bianconi >=20 > Fixes: c7fd4a5d3f75 ("mt76: mt7915: enable hw rx-amsdu de-aggregation") > Signed-off-by: Felix Fietkau > --- > drivers/net/wireless/mediatek/mt76/mac80211.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/= wireless/mediatek/mt76/mac80211.c > index 7684a8cf00fb..0d92b658b6a6 100644 > --- a/drivers/net/wireless/mediatek/mt76/mac80211.c > +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c > @@ -517,10 +517,14 @@ static void mt76_rx_release_burst(struct mt76_phy *= phy, enum mt76_rxq_id q, > =20 > /* first amsdu subframe */ > if (status->amsdu && !phy->rx_amsdu[q].head) { > + if (status->last_amsdu) { > + nskb =3D skb; > + goto reset_burst; > + } > phy->rx_amsdu[q].tail =3D &skb_shinfo(skb)->frag_list; > phy->rx_amsdu[q].seqno =3D status->seqno; > phy->rx_amsdu[q].head =3D skb; > - goto enqueue; > + return; > } > =20 > /* ampdu or out-of-order amsdu subframes */ > @@ -543,7 +547,6 @@ static void mt76_rx_release_burst(struct mt76_phy *ph= y, enum mt76_rxq_id q, > reset_burst: > phy->rx_amsdu[q].head =3D NULL; > phy->rx_amsdu[q].tail =3D NULL; > -enqueue: > if (nskb) > __skb_queue_tail(&dev->rx_skb[q], nskb); > } > --=20 > 2.30.1 >=20 --KL28bWGfPXz2IigD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCYG2PMwAKCRA6cBh0uS2t rFGHAQCGUOIRxcCL58cKnO0hR5DPQZFpakvGcVzHrjB8UHtIyAEAmyJMjfkYz3B6 ED6Yj2PxzFWuwj5GSy0hNfP26lO9LQ8= =JTLo -----END PGP SIGNATURE----- --KL28bWGfPXz2IigD--