Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1873117lqe; Tue, 9 Apr 2024 03:03:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxiiVHCEMco3cl2x7JvMs7pXTfFVZ77WeDOZXqt97VMCbk8tAPlA30ajPAYUXz1pLbammrR3qpOaTpaeBiEOw/UlLLjmu0+VStdGoPsQ== X-Google-Smtp-Source: AGHT+IE+qFKgUsU28e8WyDhJvKkw8tZ7ZD8D63lZ0aYQm7pV4ylhLZHIr++ApMQh+YagNXM4ljgL X-Received: by 2002:a17:906:fb09:b0:a51:dcda:dcde with SMTP id lz9-20020a170906fb0900b00a51dcdadcdemr2575899ejb.70.1712657013661; Tue, 09 Apr 2024 03:03:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712657013; cv=pass; d=google.com; s=arc-20160816; b=DPb75WuYuNRkaZLZVRLibTKg1Fj2rsy4sKJYr60ic5wq1ZXElpKtbsRBif/ogXyoGW mOmUMryDsNRJ/2Y+9U3C15f7HBMz/eTXq1y8hvfNFnQQ4JIFB8Lxv7rtaPjs1LxNL+bB /NKi4yb07so6Ht6/KerF7pUXKQxeq0Kn1UC542IpgaOqlFIoQhiOMmNxCqbFzGCmMX0+ eqB5wOh8MUZ0C5eB2emLbtyH65l9TyoMr0ixl4HDnwNfMIdHZtRarwFIn5bgineaY1v4 cAVGWGJdTDnv0M2OGrwROF3QLCkhhreOIYGj/zm2xaCpKpmyp155RFYiC5lMDf9ffrk1 Nr4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=ztGZ5c30dWolo0WRD0gHUQRamj5xogDJS9xhQpq4DnI=; fh=u01iK4+1ahoESo5++m1OCMPAGJeSkUPMPMfRRFLUbqc=; b=neXm8bWtccpLLt2MyPAx+XNW5jJKtjQX30JkP+yDslDUFaoilHsQvxEXLi1+tlk/nc mVyzstVfSmDGWctd0zF+Z6SCJGB4epl7Hoi7avYXDmh/g4/CfNWyuK8raN/q3S+D+ZT1 HRbRz1t0xKBvce165gHdKfKMIIqjAjFSyv0XrwC96A9RL8XVuDVqKE7qpU/UN1zHOKXQ AafV5pxmnDxKl7ch8P9Y/BlVJkusGs/aO1WlI1598FNJBFJGXe+TeYbqkmdXqVRDFDH9 kO2gU7U+/Df/ywj2vt2d/lsoLVjZjqGnh5NghPl+67rMq0122Y71Ht+XsT1kWfqsl134 VULA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CaS3hDVH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id go41-20020a1709070da900b00a51d9d7bc2fsi1742580ejc.66.2024.04.09.03.03.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:03:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CaS3hDVH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 07ABE1F21F2D for ; Tue, 9 Apr 2024 10:03:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DC8280630; Tue, 9 Apr 2024 10:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CaS3hDVH" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A2A280619; Tue, 9 Apr 2024 10:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712657005; cv=none; b=VkpINaxxZtVlpwfjAFQ0GTfwo8+FLwcl61QUJ0p9lJIB9KoQsZ11gIRmr+6lUVx0/EQGhm38UPR8uc77OIjSRwfXuoT/7YAxCszrHA4/QPrBrvzM4RU/c7l+cKr/wyGpyu9deJX71k3s2AiF/4Vgnx7ywVsQOs9quMOXPSX8dJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712657005; c=relaxed/simple; bh=iTNCMmIBrqKAd1ZLJrqU0oi+mUhYpPEw/iRl1+vEJFM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=n+iwzPZ9ZbwZ42WbYs2tOxg4e2oHqf/zz/aXUMNJEIZSF45NfY+pJMEqLWlEk16FuSRQeS84pSh/F2BHiYBBAZTwVMLXcCsj7MrrqwoKGfwYONxXJg+JG406KNxmVhk/adNxwMR3b3V/0HphebSfwIYITdGF6hgNaYtTl4pp/OY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CaS3hDVH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04C6CC433F1; Tue, 9 Apr 2024 10:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712657004; bh=iTNCMmIBrqKAd1ZLJrqU0oi+mUhYpPEw/iRl1+vEJFM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CaS3hDVH0ZSF6klcFqrO4Ey1bc/QKOA07ywyZGABJzEipRFSqFG8Lp9ZluAu+PVYW msvEMtYrfeQIiDeSGp3iL/bvKf8pFCOh3gI2sz1/perPxta+N1ubLmp/MHXJH2EzZC TlFDXjJ5KwjWkWEpA0HM7cMk7jywfJ8Ir0R4UuAOAQCshGgdg0HImae39J7aqZMxNG MuGh0G5azU7jBbpQ2dRXDUXvrVKy16FCZXv18+ZR7Dh/vz3+0s9cOdzyTu1mENJ70C EpwTbekjNbVRLfdBDrXml9uXi8G2zauJCrkdjYaI4qe5j0pvKeiZPcQUeSJ5vZ+xWH LctGFMmx4zI9A== From: Kalle Valo To: Breno Leitao Cc: kuba@kernel.org, ath11k@lists.infradead.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, imitsyanko@quantenna.com, geomatsi@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 0/3] wifi: Un-embed ath10k and ath11k dummy netdev References: <20240405122123.4156104-1-leitao@debian.org> <87y19r264m.fsf@kernel.org> <87pluz24ap.fsf@kernel.org> Date: Tue, 09 Apr 2024 13:03:21 +0300 In-Reply-To: (Breno Leitao's message of "Mon, 8 Apr 2024 12:33:55 -0700") Message-ID: <87edbe26qe.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Breno Leitao writes: >> > Reading the issue, I am afraid that freeing netdev explicitly >> > (free_netdev()) might not be the best approach at the exit path. >> > >> > I would like to try to leverage the ->needs_free_netdev netdev >> > mechanism to do the clean-up, if that makes sense. I've updated the >> > ath11k patch, and I am curious if that is what we want. >> > >> > Would you mind testing a net patch I have, please? >> > >> > https://github.com/leitao/linux/tree/wireless-dummy_v2 >> >> I tested this again with my WCN6855 hw2.0 x86 test box on this commit: >> >> a87674ac820e wifi: ath11k: allocate dummy net_device dynamically >> >> It passes my tests and doesn't crash, but I see this kmemleak warning a >> lot: > > Thanks Kalle, that was helpful. The device is not being clean-up > automatically. > > Chatting with Jakub, he suggested coming back to the original approach, > but, adding a additional patch, at the free_netdev(). > > Would you mind running another test, please? > > https://github.com/leitao/linux/tree/wireless-dummy_v3 > > The branch above is basically the original branch (as in this patch > series), with this additional patch: > > Author: Breno Leitao > Date: Mon Apr 8 11:37:32 2024 -0700 > > net: free_netdev: exit earlier if dummy I tested with the same ath11k hardware and this one passes all my (simple) ath11k tests, no issues found. I used this commit: 1c10aebaa8ce net: free_netdev: exit earlier if dummy -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches