Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1928091ybh; Thu, 23 Jul 2020 23:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh2mKdLqBrdcBcV2zOEdAfvZ53s7uVZp+tO+OF9+BfPgT+mms6Zz376mYP5oiy/0ysxbrA X-Received: by 2002:a05:6402:1852:: with SMTP id v18mr6164791edy.117.1595571766909; Thu, 23 Jul 2020 23:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595571766; cv=none; d=google.com; s=arc-20160816; b=Zt3XSqWbvXD2AhPHGTEiZ/S6UE2eB+HkC9BcwzNYRJbHL5q0aWaDTx6u99MqPA+fqg qxXrckky3FRH+1waj4kP1pDKqiNkS0HEzuRRK1jiHsXtDzKpnTnokA5t5YJbFHvHJHxQ /kh2Hx9gi1qZcmAxOQ6Ohzp5KnV8OMNLfue3mjIW/BHYGSxiSrTRPakPNkeUgqvJJQ8/ puBbjv3Aw42e8DhalQq/mZeo9EfL7NlIvVdXHVz3ZhTICv8jE1zzoXwRGzQir8cmo6FD XhoTotnoT9+HiNkwDouQWwbfvqIIho5DpXY12/q4MlxM4i9rmSwy7jlj0XnpyPs1waWi ZUGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dmarc-filter:dkim-signature; bh=BZ8AC3965Q0AhovgKqImxBL3OP0Y01iMFp0654oHm0Y=; b=m8STrBQheW0/dmUokyuQD7TE9TYmDonbpKUScpyUyYqkU4zVM6sjsuT/9ME2OZ/r49 T60MLBvPabRwRl/t8jDH5rpIdw2MTSURhOw+pL9peHZDtuxghNMJLNlaG/r1aMYB5EkT gJ2K+ndjVvfLT02+FeI2b2pU8tdIrrJDH0sk9vub9iTKoIW5/A5ekNmLMLmwbquk3rDk QDGyIW+ta7EvRK1GqZRaOoFw2eT5+XC/eDrkt2rhksxiNBwiDA7H//226Dqgyfkmdmc/ 0ggwRSo/bIsEk6mTduxoICptgyaVtyUiEM/7DLunIT+u9GGQaFD+iag7lW4BMF9m84vk LLlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=N6NnBqtC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si20895ejb.103.2020.07.23.23.22.13; Thu, 23 Jul 2020 23:22:46 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=N6NnBqtC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbgGXGV1 (ORCPT + 99 others); Fri, 24 Jul 2020 02:21:27 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:18866 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbgGXGV0 (ORCPT ); Fri, 24 Jul 2020 02:21:26 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1595571686; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: In-Reply-To: References: Cc: To: From: Sender; bh=BZ8AC3965Q0AhovgKqImxBL3OP0Y01iMFp0654oHm0Y=; b=N6NnBqtCNGIEPyMQxxqOt8htobXxULCLkHoMPSwlw2zZYq7cj6xIoqvv9+kfEXWpkEUFdj4T pjUbC5EN2YgYJoGjByv8PURfHR9xRDBGHzIBfX77XCNb2zNQQh735kuQTGJo9Q0RAqANiIay 7xzRoC8js3QfPjkpmmb5zbERL6Y= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n18.prod.us-west-2.postgun.com with SMTP id 5f1a7dde8e9b2c49c6e2397b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 24 Jul 2020 06:21:18 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 52921C433CB; Fri, 24 Jul 2020 06:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from Pillair (unknown [183.83.71.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pillair) by smtp.codeaurora.org (Postfix) with ESMTPSA id ED84CC433C9; Fri, 24 Jul 2020 06:21:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ED84CC433C9 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=pillair@codeaurora.org From: "Rakesh Pillai" To: "'Johannes Berg'" , Cc: , , , , , , , References: <1595351666-28193-1-git-send-email-pillair@codeaurora.org> <1595351666-28193-2-git-send-email-pillair@codeaurora.org> <0dbdef912f9d61521011f638200fd451a3530568.camel@sipsolutions.net> <003201d6611e$c54a1c90$4fde55b0$@codeaurora.org> In-Reply-To: Subject: RE: [RFC 1/7] mac80211: Add check for napi handle before WARN_ON Date: Fri, 24 Jul 2020 11:51:12 +0530 Message-ID: <000401d66182$a3d97ab0$eb8c7010$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG1Bu1FBYi7G1oVhHY/01uT1gSslwIktOPGArPni2UCL/NlBQHsbdYmqRFPSaA= Content-Language: en-us Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Johannes Berg > Sent: Friday, July 24, 2020 1:37 AM > To: Rakesh Pillai ; ath10k@lists.infradead.org > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; > kvalo@codeaurora.org; davem@davemloft.net; kuba@kernel.org; > netdev@vger.kernel.org; dianders@chromium.org; evgreen@chromium.org > Subject: Re: [RFC 1/7] mac80211: Add check for napi handle before > WARN_ON >=20 > On Thu, 2020-07-23 at 23:56 +0530, Rakesh Pillai wrote: >=20 > > > > - WARN_ON_ONCE(softirq_count() =3D=3D 0); > > > > + WARN_ON_ONCE(napi && softirq_count() =3D=3D 0); > > > > > > FWIW, I'm pretty sure this is incorrect - we make assumptions on > > > softirqs being disabled in mac80211 for serialization and in place = of > > > some locking, I believe. > > > > > > > I checked this, but let me double confirm. > > But after this change, no packet is submitted from driver in a = softirq > context. > > So ideally this should take care of serialization. >=20 > I'd guess that we have some reliance on BHs already being disabled, = for > things like u64 sync updates, or whatnot. I mean, we did "rx_ni()" for = a > reason ... Maybe lockdep can help catch some of the issues. >=20 > But couldn't you be in a thread and have BHs disabled too? This would ideally beat the purpose and possibly hurt the other = subsystems running on the same core. >=20 > johannes