Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1206390pxb; Wed, 10 Feb 2021 02:50:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4kD/oTpeqAC8fDC4EtwcU6N1LSsbzBSFJEpVpukV4hXNX7NLmjWcF0rPorr0+So4O0wzg X-Received: by 2002:aa7:c655:: with SMTP id z21mr2590461edr.27.1612954227031; Wed, 10 Feb 2021 02:50:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612954227; cv=none; d=google.com; s=arc-20160816; b=U4q121oDwM2racG8g7xHyCFodpDlF/d0V6PPXAhU7mMi2s8Tr7IIkpJRe9E7/ee9Yc caSda/CaP1ernWtQ4yquz4lt2d4aKUwwHm0RiNkGrIMW7+UfBDTNH+K2nJnftotsyeXN 3uwam83K0wCv5JbAVG07G4KdGG8Sjw2MrrXAA9EA/FJq7wWauxMrC05yoLgzNzCryKht O3BFooqyRy8Seyt9HVw4Vpn4kIOvqv1pWobTzpF1W2N//ArAR9glINkfohSLXoqXSL1A St99H1U2NoBlQP9ATlfoRzHO6NFRjJWU+uRSbcmje2xIN+oWiz9Ma1MvYc6jCXwcBhS/ zodQ== 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=1rNLXcvXKP3m/fnPThWaXf4M817aZUPGjPuR43utm5Q=; b=zEMiGTniXFQ6zsb6AC/x3BF54T+t1/hTMwx1lGAJ6Ndq69YXYythhXXyvFLw/25uJn MvgHISIfIk/9/YTUl44Sm6kzI9pLwJFu3T/weii8yR57uG96YnOQ36KlIzxvIBJ+9d7v ReBuQLqcg3zUjQarMIwZfjxG2ZFMHyoXSk8fnd8eGhPmv4zXmDcGml7kzxsPBlzJx0K6 8874Ucqk5MdtHxzAWC+QozwZ7jr7rawo7IeKZq255efPkdIeTLKCSOyIwNBza6n7Oubc AtFjq0ABnPbNdFU4QoXzM4UgO1TjLy55lhrhnxlfHEslWaDs/KJ4di8XJ6ozbXmjr9XH Ks5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bQRtat1X; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si984966ejd.603.2021.02.10.02.50.03; Wed, 10 Feb 2021 02:50:27 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=bQRtat1X; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231432AbhBJKtT (ORCPT + 99 others); Wed, 10 Feb 2021 05:49:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231518AbhBJKqd (ORCPT ); Wed, 10 Feb 2021 05:46:33 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5C49C0613D6; Wed, 10 Feb 2021 02:45:52 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id w2so3194077ejk.13; Wed, 10 Feb 2021 02:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1rNLXcvXKP3m/fnPThWaXf4M817aZUPGjPuR43utm5Q=; b=bQRtat1Xo7i63Co4iAOtYmLAkcqeWBNEsuqqBTZC/sdXBIAuIhxW+yEfTW7tMgqXNR NaqrHFZLhkELQZJs+Rxzc6q22fgJ7363f58/IxCP6HhoDlKmUBej3Ud7JVC3V9cSXGem M/20hpLtqmJRy0w3i1zTiJH+zAlGzK3m6GyQGGjRlikreB00qh2GmmGAic23HCI1QYq2 7wWLGrtE2dwuCysbP8+AGFZbanuCLPhXOwBiXqaUzPlZkm2CV1xqkaDh9CWquq87io07 dKu37qYD14SYEK9H9QJq9UyJdO0odBc/pu/TO6ffraYdMRCrTMr1SUVKvxJ4U+2g8Y/S erXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1rNLXcvXKP3m/fnPThWaXf4M817aZUPGjPuR43utm5Q=; b=rLJXn4303qDi21mTs11T4L1lDHhzNFm+jDk6z5YUylwLqMWm8wUSVeuZhUpeVxKoLT R4A0I2GSrX4zhFoYZdXkxoKBjBvNBEc1SU427Gj8a6ykH/wqMG2PS5Qm3BqYRZR3bc+I zEXf0QVGa8nVr6Q+vgmVJ+QUW/iFF8dQP0cpMvUfKrKPEzM93q8Z/nM4OaLYySXDwIi4 SZLAnXx/qlhYTvLh6VQoavjPFaPrKwyVkOCGLcUJ/L5nQIXX5qpwiY//dH04WIwl4siI 6oyZUFdLgGBYP9MRM1fEJv+Egyn/bVhmJuVOH1+Fpqw3yXwGohJojG8krddSEm4Eb+Qi IPEQ== X-Gm-Message-State: AOAM5309HP132TJpu8WMcYpWhSPCugsKUdG7qkI2c9ziECFuLSM8vGvN dyWJ3z7pRZj5vtMB3uETgda5fGACs8s= X-Received: by 2002:a17:906:4eda:: with SMTP id i26mr2229075ejv.467.1612953951473; Wed, 10 Feb 2021 02:45:51 -0800 (PST) Received: from skbuf (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id c18sm675126edu.20.2021.02.10.02.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 02:45:50 -0800 (PST) Date: Wed, 10 Feb 2021 12:45:49 +0200 From: Vladimir Oltean To: Nikolay Aleksandrov Cc: Jakub Kicinski , "David S. Miller" , Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Jiri Pirko , Ido Schimmel , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Vadym Kochan , Taras Chornyi , Grygorii Strashko , Ioana Ciornei , Ivan Vecera , linux-omap@vger.kernel.org Subject: Re: [PATCH v3 net-next 00/11] Cleanup in brport flags switchdev offload for DSA Message-ID: <20210210104549.ga3lgjafn5x3htwj@skbuf> References: <20210210091445.741269-1-olteanv@gmail.com> 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-kernel@vger.kernel.org Hi Nikolay, On Wed, Feb 10, 2021 at 12:31:43PM +0200, Nikolay Aleksandrov wrote: > Hi Vladimir, > Let's take a step back for a moment and discuss the bridge unlock/lock sequences > that come with this set. I'd really like to avoid those as they're a recipe > for future problems. The only good way to achieve that currently is to keep > the PRE_FLAGS call and do that in unsleepable context but move the FLAGS call > after the flags have been changed (if they have changed obviously). That would > make the code read much easier since we'll have all our lock/unlock sequences > in the same code blocks and won't play games to get sleepable context. > Please let's think and work in that direction, rather than having: > + spin_lock_bh(&p->br->lock); > + if (err) { > + netdev_err(p->dev, "%s\n", extack._msg); > + return err; > } > + > > which immediately looks like a bug even though after some code checking we can > verify it's ok. WDYT? > > I plan to get rid of most of the br->lock since it's been abused for a very long > time because it's essentially STP lock, but people have started using it for other > things and I plan to fix that when I get more time. This won't make the sysfs codepath any nicer, will it?