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 1EF44C05027 for ; Mon, 6 Feb 2023 13:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjBFNoS (ORCPT ); Mon, 6 Feb 2023 08:44:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjBFNoI (ORCPT ); Mon, 6 Feb 2023 08:44:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12B8044A2 for ; Mon, 6 Feb 2023 05:44:07 -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 ams.source.kernel.org (Postfix) with ESMTPS id A8E61B81113 for ; Mon, 6 Feb 2023 13:44:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1644C4339B; Mon, 6 Feb 2023 13:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675691044; bh=7egH/SExhRV9d4kVN8khu0ao7vH/80ivewRGFAx9y+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XGtjqa3GNC5wAy+3RiaYkp9d/Vk5skiEc6+xRRO43U9uTqY6nM/99U2K609yqx1HH mg6Eh6rdPIcGzOuNHmawll/6uQFJvPN3BJermC5WEvxu3yLf4JQ1ewAH90JWfW1hUL oxCZv1EUGMmJqAEH61HKAx/pp3xm6hmT1cYtphkVISYJkRmRS29PkU2tq1/KB1/rOK X2r0gfRq/Fv8Xi1U8hBTQIlgtpcUqrjZkQVOq1pu4H9U5z8sYETL1tccu+cnWRK15a t9omFvsOCPhuuloddZpn/obiH/MQdkqGSsnzjoZFT9mBrfFRlsnTtXorB8EWbK1PBs gOx0tjMv8pVEA== Date: Mon, 6 Feb 2023 15:44:01 +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 11:07:54AM -0400, Jason Gunthorpe wrote: > On Thu, Feb 02, 2023 at 04:05:18PM +0200, Leon Romanovsky wrote: > > 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. > > That make sense, the commit message should explain it.. OK, I added the following to the commit message. RDMA/mlx5: Fix MR cache debugfs error in IB representors mode Block MR cache debugfs creation for IB representor flow as MR cache shouldn't be used at all in that mode. As part of this change, add missing debugfs cleanup in error path too. RDMA/mlx5: Fix MR cache debugfs error in IB representors mode Block MR cache debugfs creation for IB representor flow as MR cache shouldn't be used at all in that mode. As part of this change, add missing debugfs cleanup in error path too. Thanks > > Jason