Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp718403pxb; Wed, 27 Oct 2021 11:00:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF1sRtVPgPtvpFpk0Nzt/H4I/u/ge/JniUc5HYSfpn148gPmHg8jlNXYd7zLU63AJrX3Ll X-Received: by 2002:a17:907:ea5:: with SMTP id ho37mr39636794ejc.355.1635357646324; Wed, 27 Oct 2021 11:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635357646; cv=none; d=google.com; s=arc-20160816; b=Rc3NKAUL9dfMxgTx9ynLWjzrezQeSJ+gHLzrQcmJ8RYaiYKkSjwV6+umGPhxNs1sMI aAtcj3NBh3s1uLX3HptpSXgskHjtCSBQTmpgl8seOFYeKi5kH/CcumOBQ1L8wniXeMT7 eSom0QrExB01ff0Ul3mirCbImd23a0aihy85+HRR1mZ7iWz3db45pWUbLI2rUhC544Fc rfA3e2eZ8Y0iN+IquXEMbjyBE460NkTQ7J/ElIu0hoijhKRpOO8Lgw54btxOPytQKcFJ Mas+OrDe+Ag7QXCSFc56kbKC3GMYQm3OAxSxiAPUfFvxLTh4T00vu+Lg596o2O22U4pS fvqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ebp1FWnnZB12gDmzSewVb93jQR5/mrER9eV3zi4Yyns=; b=rcps/lvcJU8Qmn+1TOQ9sRy6hsCWXZKRA7vvZNWY4kBQfs7TXtAkmK2rlGhtFFF9Nz Bx1tluMHHpvmWUx0r2k5FmXvDEgZWtwSMZrQzZnUiqhsB7n2erhTNRkriNso/gqJsRnC U/BvBDlIdAEEB0oJCPRayYro7h89ErOhbdDqc0w4eA0oMiOpPWJrWWMoJyRn2lLFlfeH wYaCyBWPuh6ywkxQoYUz5aqdf1p4bgUQ0A/te+SHEq5EUD2WS0IYvl4IYCKs6NVf1QUW vxvUkNj/COsmqsZY1B1dLqFSMi9jSYqP1AD5L0pWJuLrcjSg+wpJWU3I8m78gqrMNMmv JrNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDxrgT+Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si779023edf.85.2021.10.27.10.59.54; Wed, 27 Oct 2021 11:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDxrgT+Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbhJ0F7Q (ORCPT + 99 others); Wed, 27 Oct 2021 01:59:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:39938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239783AbhJ0F7O (ORCPT ); Wed, 27 Oct 2021 01:59:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0AA8610A5; Wed, 27 Oct 2021 05:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635314209; bh=YgmW+t8asJX/JwlVQGunsHP1Jp0HXbk0ZQuIFp5nlRI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IDxrgT+YfY/woreXfsB9D1KtOFGm1Zste5kSQzKrZcipYu1kFFPER9HS2OTAgPPIW Zhhe/y9acKQAp/bl0PrO6uwvJDA+sPkDlCpO30SaCi/aYhXqFjzU+PTAxExZKMvTXn O561fEuOul6IQ9mmNGfiDPXs1BLZ9plchDrQ/OiXvIbgpw1CslRPe7PDeKR4Mcnw1f 4e5se9hU+Ta596VPAM/oh3lYLjufB5Ix1nSOwx5XHj/yQySTMJRxhGsjhXpvxpLnk+ qCCdWX2AbJj9X4vfOrse8+VGBqBGwHZaXnk6jtqCFXem05LPOzCy9Jbvzg2nw0DPpL qiISaBJBO86nA== Date: Wed, 27 Oct 2021 08:56:45 +0300 From: Leon Romanovsky To: Jakub Kicinski Cc: Ido Schimmel , "David S . Miller" , Ido Schimmel , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, syzbot+93d5accfaefceedf43c1@syzkaller.appspotmail.com, Edwin Peer Subject: Re: [PATCH net-next] netdevsim: Register and unregister devlink traps on probe/remove device Message-ID: References: <20211026120234.3408fbcc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20211026125602.7a8f8b7e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211026125602.7a8f8b7e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 12:56:02PM -0700, Jakub Kicinski wrote: > On Tue, 26 Oct 2021 22:30:23 +0300 Leon Romanovsky wrote: > > On Tue, Oct 26, 2021 at 12:02:34PM -0700, Jakub Kicinski wrote: > > > On Tue, 26 Oct 2021 19:14:58 +0300 Leon Romanovsky wrote: > > > > I understand your temptation to send revert, at the end it is the > > > > easiest solution. However, I prefer to finish this discussion with > > > > decision on how the end result in mlxsw will look like. > > > > > > > > Let's hear Jiri and Jakub before we are rushing to revert something that > > > > is correct in my opinion. We have whole week till merge window, and > > > > revert takes less than 5 minutes, so no need to rush and do it before > > > > direction is clear. > > > > > > Having drivers in a broken state will not be conducive to calm discussions. > > > Let's do a quick revert and unbreak the selftests. > > > > No problem, I'll send a revert now, but what is your take on the direction? > > I haven't put in the time to understand the detail so I was hoping not > to pass judgment on the direction. My likely unfounded feeling is that > reshuffling ordering is not going to fix what is fundamentally a > locking issue. Driver has internal locks it needs to hold both inside > devlink callbacks and when registering devlink objects. We would solve > a lot of the problems if those were one single lock instead of two. > At least that's my recollection from the times I was actually writing > driver code... Exactly, and this is what reshuffling of registrations does. It allows us to actually reduce number of locks to bare minimum, so at least creation and deletion of devlink objects will be locks free. Latest changes already solved devlink reload issues for mlx5 eth side and it is deadlock and lockdep free now. We still have deadlocks with our IB part, where we obligated to hold pernet lock during registering to net notifiers, but it is different discussion. > > > IMHO, the mlxsw layering should be fixed. All this recursive devlink re-entry > > looks horrible and adds unneeded complexity. > > If you're asking about mlxsw or bnxt in particular I wouldn't say what > they do is wrong until we can point out bugs. I'm talking about mlxsw and pointed to the reentry to devlink over and over. From what I read about bnxt, it is test issue.