From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 709AAC61DA4 for ; Thu, 2 Feb 2023 14:05:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbjBBOFZ (ORCPT ); Thu, 2 Feb 2023 09:05:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbjBBOFY (ORCPT ); Thu, 2 Feb 2023 09:05:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D50543FF28 for ; Thu, 2 Feb 2023 06:05:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 768F261B66 for ; Thu, 2 Feb 2023 14:05:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B41EC433EF; Thu, 2 Feb 2023 14:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675346722; bh=NfkEnp+t9nciEZCj8gfCIOpeLdNEzHWQM+X3oepNvak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=riVvBanOvY46Hum5pDgJ+ZmYpSVLATssivomUIBeixmBNuy/VE8DBA5W/XD3kYdEu RQJ4qnDcKuNVn7p5xtuqmnbXcw1bAn1nzQbKjg3pG9fUynqnDArd+I9d72zFihQrYq nAHO4xgLmB/y3rG+d5xef1Yd1fds2a4IGeRD969HN2QTEXXLeGprruRPgueSMCvy3j 0OYIaehqqjA21WVNnkPEFBfNAA7XrtoD+KFH++fS2YxGUsuyIQzarw5E8O8M+gauB5 f6pyBXO0qm8Jh05RNy5KI06oF8dxaJ1Piv21j+oHSHE219YSkDV8ITfcVaEdicRCNB KPLuQbt9p18VA== Date: Thu, 2 Feb 2023 16:05:18 +0200 From: Leon Romanovsky To: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, Michael Guralnik Subject: Re: [PATCH rdma-next 1/2] RDMA/mlx5: Fix MR cache debugfs in switchdev mode Message-ID: References: <482a78c54acbcfa1742a0e06a452546428900ffa.1675328463.git.leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Thu, Feb 02, 2023 at 09:56:51AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 02, 2023 at 11:03:06AM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Block MR cache debugfs creation while in switchdev mode and add missing > > debugfs cleanup in error path. > > Why does switchdev have anything to do with this? > Because we always had the following code in cleanup: 697 static void mlx5_mkey_cache_debugfs_cleanup(struct mlx5_ib_dev *dev) 698 { 699 if (!mlx5_debugfs_root || dev->is_rep) 700 return; 701 MR cache shouldn't be used at all for IB representors, and more comprehensive patch will take more work than this simple solution. Thanks > Jason