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 08B6BC636CC for ; Mon, 13 Feb 2023 21:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230016AbjBMVBg (ORCPT ); Mon, 13 Feb 2023 16:01:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbjBMVBd (ORCPT ); Mon, 13 Feb 2023 16:01:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB7E211E5 for ; Mon, 13 Feb 2023 13:01:30 -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 9484B612EE for ; Mon, 13 Feb 2023 21:01:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2B10C433D2; Mon, 13 Feb 2023 21:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676322089; bh=5phipRbrCKJ18T7CPbB8yXjpyzkLTf5lWtkWiCxqUwY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VuG9qs9NOB5Ouix+OU7UYcXOF98x+ibf+kSSQOQE3KtCQ/nEJ1jPz8pPwWld4deIh ufZj83KmkFJD6zdCHcJ+YUuYoz6ldQKHdjKKE4UPrwhl4DMemGY+ChDn4WvKkovkeO 8R59afG7DT7mnFchWNJzjb6BdXnUCe8LJSQyLUaYNuwWBHtzcD29QtuqvltyiJHlTr 5+nlnrYiPC5+spey7B2MaRzTLBnicuO1oR9lp6ar1eDo6swUYVekh1eBAuT+KNdur2 1ZXCgoys+/wiO81rOU+XVHEFcZ0303nSSgtF+afoF82R/L/Rp+pH83zH8G0IRL7hIP 40iRiUjyO7M+Q== Date: Mon, 13 Feb 2023 13:01:27 -0800 From: Jakub Kicinski To: Ido Schimmel Cc: Petr Machata , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, Amit Cohen , mlxsw@nvidia.com, Maksym Yaremchuk Subject: Re: [PATCH net] mlxsw: spectrum: Fix incorrect parsing depth after reload Message-ID: <20230213130127.1746b50e@kernel.org> In-Reply-To: References: <6abc3c92f72af737cb3bba18e610adaa897ced21.1675942338.git.petrm@nvidia.com> <20230210193350.239f707f@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, 11 Feb 2023 18:21:45 +0200 Ido Schimmel wrote: > > Sounds quite odd TBH, something doesn't get de-registered during _down() > > but is registered again during _up()? > > It's not really de-registered / registered. The FIB multipath hash > policy isn't changed when devlink reload is issued, so the driver > doesn't bother decrementing the parsing depth reference count. The diff > below does decrement the reference count on reload_down(). Tested it > without the current fix and it seems to work. If you prefer, I can send > a v2 with this diff squashed into the current fix. That does seem cleaner to me, less error prone in case some actual clean up is missed later. So if you don't mind - yes, I'd prefer the patch from your reply, thanks!