Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp579477ybl; Wed, 21 Aug 2019 02:14:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1GP7efPWb5AoCajJ+XvlbAOdFQmJKRdzIclCAl8FDY9SpQVZYMYmWSXKTzLZQfftf6ZpD X-Received: by 2002:aa7:8218:: with SMTP id k24mr33360875pfi.221.1566378851183; Wed, 21 Aug 2019 02:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566378851; cv=none; d=google.com; s=arc-20160816; b=HJ5Nin6hwano80JAKq+7W1qWbVe6aTGKhVTZqUeQN4iriYfoj44KubFblDh5QmmFDg qUV8BeeDzXGmaq3NEPebuV58YMx6XE0/+3o85mV/cARwTk21LTKPxFzak6yI8aW+LwjB PgmOzQrVGm2yySReYqWy1MQxsL8z9KZ/yEpnHO51aLIzF0QBEg+nspAG+i2PHkvOqglC yAfnJZKmMJHF9pfPKPCmFuwko7x5Bk0mio6iXbJYFt2zs/9gj1OofCHwpJxwVWsoODdQ C/up3Nbd6/yojqH9LTFoQ/Jqy6WkpxGoE4a+rVp8rFFEP7RzngFqpGph4H7NBcxlaaSY 7CGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=2nHznY7Qu8mOJssYCNffar/RcxYRnf1JP1C9aBwJLgE=; b=IMe4pMG58OuMDaHA+eYmi2P7o8m0t5AtBhERVvTv3tnQsNeOPGWL4ThvC586qWvpYm zXo9N7ca6Y9AaY7C5IYHXh5ePRs5F32ndpupM4N2iY3r0DCsa9Pk7TMGZVmOetWkasjR sJ/1Gbc/Jls4NaAOxlfe3yuKKFZbjriU4I3Hio2i8Vm+rAhU+4GWExNdQSwLPjZMLjXH ihKAA2ZtvvOoVYzU3SCm1KHvuYXUuQ/e/3r3H+GE8/9Az9S715oA1tcOUNiQUiI0vEL8 ClsQmyZh5mlXMQcOd9fynPboDBlZwR/Swuy0j6RosVWsPfHbJArkRPCIDGBugRnqj/P8 ryQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=R3a4zdtH; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si13887987pgr.243.2019.08.21.02.13.56; Wed, 21 Aug 2019 02:14:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=R3a4zdtH; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727040AbfHUJDF (ORCPT + 99 others); Wed, 21 Aug 2019 05:03:05 -0400 Received: from nbd.name ([46.4.11.11]:58806 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfHUJDF (ORCPT ); Wed, 21 Aug 2019 05:03:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2nHznY7Qu8mOJssYCNffar/RcxYRnf1JP1C9aBwJLgE=; b=R3a4zdtHcLJIEFeVD2wfbrV8Ul 96rkXBhQrwfiGOuTgsGOoiyLdmmCLGNxA7WUvjxGDC1Op3Gw96nXQbjOo/tJ+PEVbZcl7dNB/LX5t I48C7yj20avYx2n9dHfFcQIcm1m60/dsfsx6WPvLwptY2uWp6YMnUI5KuVY5QkLNQm7E=; Received: from p54ae9443.dip0.t-ipconnect.de ([84.174.148.67] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i0MWD-0000Dr-7I; Wed, 21 Aug 2019 11:03:01 +0200 Subject: Re: [PATCH 5.3] mt76: mt76x0e: don't use hw encryption for MT7630E To: Stanislaw Gruszka Cc: Lorenzo Bianconi , linux-wireless , Ryder Lee , Roy Luo References: <1565703400-10623-1-git-send-email-sgruszka@redhat.com> <20190815100936.GA21775@redhat.com> <727fd528-16c1-e3b3-e1a9-2edbcbdddee7@nbd.name> <20190819110639.GA6037@redhat.com> <7b46ab63-d69d-f389-b3c2-245cbe11c7b7@nbd.name> <20190820112438.GA2227@redhat.com> <20190821084724.GB20223@redhat.com> From: Felix Fietkau Openpgp: preference=signencrypt Autocrypt: addr=nbd@nbd.name; prefer-encrypt=mutual; keydata= mQGiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtc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geRGAAn1ee RjMaxwtSdaCKMw3j33ZbsWS4 Message-ID: <433c1d1f-3590-375f-ed8d-c9de2af873d5@nbd.name> Date: Wed, 21 Aug 2019 11:03:00 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190821084724.GB20223@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2019-08-21 10:47, Stanislaw Gruszka wrote: > On Tue, Aug 20, 2019 at 01:24:39PM +0200, Stanislaw Gruszka wrote: >> > Can you test if disabling hw encryption only for shared or only for >> > pairwise keys makes any difference? >> >> Disabling only pairwise keys helps. Disabling only shared keys does >> not help. >> >> Not sure if this will be helpful information or make things more >> confusing, but seems the difference between mt76_txq_schedule() >> and tasklet_schedule() in mt76_wake_tx_queue() is that on >> mt76_txq_schedule() some tx packets are serialized by dev->rx_lock >> (because some ARP and TCP packets are sent via network stack as response >> of incoming packet within ieee80211_rx_napi() call). Removing >> spin_lock(&dev->rx_lock) in mt76_rx_complete() make the problem >> reproducible again with mt76_txq_schedule() & HW encryption. > > So, I think this is FW/HW issue related with encryption and ordering > and we should apply patch originally posted in this thread that > disable HW encryption for MT7630E. > > I do not think we should disable HW encryption only for pairwise keys, > because FW/HW can have the same bug for shared keys, but is not > triggered in my test, as we do not sent lot of group frames. I'm still not convinced that this is just the hardware implementation of hw crypto being faulty. I think it's more likely that there's a bug in the tx path somewhere, which causes hangs on MT7630E but remains hidden (or at least recoverable) on other devices. I'm currently reviewing key handling in the mac80211 fast-xmit codepath and get the feeling that something might be racy there. I will let you know when I make some progress with that review. If we can't find the bug soon, then I'm fine with merging this patch. Right now, I would like to see first if we can fix it properly. - Felix