From mboxrd@z Thu Jan 1 00:00:00 1970 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 357E22EF67A; Sat, 7 Mar 2026 03:22:30 +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=1772853751; cv=none; b=sj/DAUSqO2vUYLipDHH//XQAs6tI6V1KbPndIjS30+hLQDdVLfp/vxk7JYq/K3QkO0KrE/WcUZYzFfLdQCYphykofj1wn/ZoakCnPymHZy5eiq7rd+rM2z7Y5P/o6ok1GLePet9k0Hs/uALdJsGJIjnwCvdVJ5vYyw1OF5UVRLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772853751; c=relaxed/simple; bh=f7vsilBDwEzuk1bMRooPqG0F25UkXjIOv3nKksiKV4Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HMqYIit037LTDavM844tD7kVIrhYAbz8bV7GhRmRSvwJq3EAKNAouPzY2sMC+xCBJMnhT4X9yUZ3mpRFSoIf6iQH878m2+bCDzHQ2PKbhW9gOsKr1muE4kRFZab87YyLthnCCFC79wACpqZB0JgkqHpFcChPXSUjlvuHknoXhRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XQI/Ew1Q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XQI/Ew1Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFAA4C19422; Sat, 7 Mar 2026 03:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772853750; bh=f7vsilBDwEzuk1bMRooPqG0F25UkXjIOv3nKksiKV4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XQI/Ew1QbJ3TWlRy3ljDCaea11ic1tkjQETXwWqVHHsO4ANtHEi5T2qNJckE2AvwW DrmtokVMviwjXCyIP1ycb4mn8PQt6VyNmzuJYv0L5UpND3376yaTH9ZFT7EBfeB76c 1ml4CXHPIL67lpuy+0vAA+2SLnckYwyvOsNcQBV7l8vRq1BsX3puluEXoZRELhd15E 14lK3FXq8qVse/Hy4s6O878I8zFWenzPQJpKa9yzp9oX+HPCn6uqaeIfQJN2Zkf/Af 7T/d9jBOVs5hCOIJ5gxJqSMr3zxa5eZyAkw1r7aU+ytZKrRa0djXcGI5DOW8N5sR7J /FXMhPghoScvQ== From: Jakub Kicinski To: ernis@linux.microsoft.com Cc: Jakub Kicinski , pabeni@redhat.com, linux-kernel@vger.kernel.org, yury.norov@gmail.com, kys@microsoft.com, decui@microsoft.com, kees@kernel.org, longli@microsoft.com, dipayanroy@linux.microsoft.com, davem@davemloft.net, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, kotaranov@microsoft.com, andrew+netdev@lunn.ch, linux-hyperv@vger.kernel.org, edumazet@google.com, haiyangz@microsoft.com, ssengar@linux.microsoft.com, shradhagupta@linux.microsoft.com, horms@kernel.org, shirazsaleem@microsoft.com, wei.liu@kernel.org Subject: Re: [net-next] net: mana: Expose hardware diagnostic info via debugfs Date: Fri, 6 Mar 2026 19:22:28 -0800 Message-ID: <20260307032228.1379456-1-kuba@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260305205252.470089-1-ernis@linux.microsoft.com> References: <20260305205252.470089-1-ernis@linux.microsoft.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is an AI-generated review of your patch. The human sending this email has considered the AI review valid, or at least plausible. For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html --- net: mana: Expose hardware diagnostic info via debugfs This commit adds debugfs entries to expose hardware configuration and diagnostic information for the MANA driver. It creates device-level and port-level debugfs entries to aid in debugging initialization and runtime operations. > diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c > index aef8612b73cb..fb513d7802cb 100644 > --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c > +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c > @@ -152,6 +152,11 @@ static int mana_gd_query_max_resources(struct pci_dev *pdev) > if (gc->max_num_queues > gc->num_msix_usable - 1) > gc->max_num_queues = gc->num_msix_usable - 1; > > + debugfs_create_u32("num_msix_usable", 0400, gc->mana_pci_debugfs, > + &gc->num_msix_usable); > + debugfs_create_u32("max_num_queues", 0400, gc->mana_pci_debugfs, > + &gc->max_num_queues); > + > return 0; > } > > @@ -1222,6 +1227,13 @@ int mana_gd_verify_vf_version(struct pci_dev *pdev) > return err ? err : -EPROTO; > } > gc->pf_cap_flags1 = resp.pf_cap_flags1; > + gc->gdma_protocol_ver = resp.gdma_protocol_ver; > + > + debugfs_create_x64("gdma_protocol_ver", 0400, gc->mana_pci_debugfs, > + &gc->gdma_protocol_ver); > + debugfs_create_x64("pf_cap_flags1", 0400, gc->mana_pci_debugfs, > + &gc->pf_cap_flags1); > + Do these debugfs entries get recreated on every suspend/resume cycle? Both mana_gd_query_max_resources() and mana_gd_verify_vf_version() are called from mana_gd_setup() during device initialization. On suspend, mana_gd_suspend() calls mana_gd_cleanup() which doesn't remove these debugfs entries. When mana_gd_resume() calls mana_gd_setup() again, it attempts to create the same debugfs entries a second time. This means debugfs_start_creating() in fs/debugfs/inode.c will print an error for each duplicate file: "'num_msix_usable' already exists in 'mana//'" "'max_num_queues' already exists in 'mana//'" "'gdma_protocol_ver' already exists in 'mana//'" "'pf_cap_flags1' already exists in 'mana//'" This produces 4 error messages in dmesg on every suspend/resume cycle, contradicting the commit message's goal of operating "without adding noise to dmesg." Should these device-level entries be removed during suspend (in mana_gd_cleanup or mana_gd_suspend), or should their creation be moved to mana_gd_probe where they're only created once? [ ... ] -- pw-bot: cr