Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp929811pxp; Wed, 16 Mar 2022 21:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJghqjC2ucpvOkDTpXMBbE2e2RWKScCCVkQcMXU+FLCrz1f22n9cfFzD4AE4rqkpTPcUDu X-Received: by 2002:a17:902:b403:b0:153:62bb:c4b7 with SMTP id x3-20020a170902b40300b0015362bbc4b7mr3266338plr.138.1647492025396; Wed, 16 Mar 2022 21:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647492025; cv=none; d=google.com; s=arc-20160816; b=Z7PhhqcJiZS5RlExH3h0mFbFe2JARPEz3ljQ28ghIu/Xhv37m5FCfpfBkshKxQQsnE pJWuz3X4J6C3ip0cwZ6CQ1kI/MrIKO9GOn+nTCxCtgY+D8IW93JDsrt7lSbHyalzA6G+ GqGARbbvYfesB/HeSMarRO5BYdIm+wDt1/4Crzuu+sIVOR5EaobvLP2LttuMM2NxgszE J0CkpCpg91+gRPOBcSMR9NU+dvAG0JZn6xUW6VN4rebdvsQ7Ir30WIgv7eBCOySW2OBt 0YZXtQ/q7xKp9XxsFAwyEnar8RWBDQHCu3WCMuCgFzX3lOIdCKrxvGZIO7F9slL1wADh XubQ== 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=j8z4v8YxtWANrTWb6RFPyfnlW/ootQzYbnhWcATbHWQ=; b=ZhtP2IqHwre+AWVtcMPSxGGYsdV62OmG3nLJzkT8YV+npVFG9S+6tFuIxmAOMim55i mktKFwvrufBxOKhS9RcQanRfaXpnzvzNIOE8yqt2CqhsKrONgfKd09XWqcDKJxtBncJL UALOU26iBqxUPzIK8YcTBpg7Mmni9G336jInw0PZEedOVTjQImXam20W9GeyNmBo+O60 mfuFBKwNo6txCfF5+0WzFjAk2IIcwY/0++vueQM7NOlF7aowNDgYTJ+Z17vLddvNTxw8 wOHLEqRPNBvRjvO/Z44LhLtkreKkHQP220IG5duS6DV1nbNEdWy4dsE8asZzF/cTxDzV Q/mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AjMTYWO0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p22-20020a1709027ed600b001501c29b560si4186113plb.402.2022.03.16.21.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:40:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AjMTYWO0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 146B712340B; Wed, 16 Mar 2022 21:04:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243503AbiCNR5L (ORCPT + 99 others); Mon, 14 Mar 2022 13:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240191AbiCNR5K (ORCPT ); Mon, 14 Mar 2022 13:57:10 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 515362DD62; Mon, 14 Mar 2022 10:56:00 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id r29so11864710edc.0; Mon, 14 Mar 2022 10:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=j8z4v8YxtWANrTWb6RFPyfnlW/ootQzYbnhWcATbHWQ=; b=AjMTYWO0eXv50h4Efspnrs7DrZdGLyTZb5SWWsRCQUMcCXc1oNqULW6PhRKMLgap58 B4Krs3qCdiKdxIBQwTlcfDKIX9Hcb/6cnL2UJqNXK2S0+3a1WTdaeEGnylXLthn65qo/ lah1W+eNY1Leu9LzmbypCiIaZGNz0wy5QR6f6SR/g306mIXdHgIQLbNuVHOKNBFe66Sz SrZdOLdgZ91VgLzbtP147JkR4lv0B1cburt4PRocOahUCRM6l9TIherZOKfA3v+z0Rqf iyUvAAosQnmzynDKWwVA6QY+xt+DNMQUQb6Tg26+frCQSkIhjFkeafwyQkd3km1GsRhC mpxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=j8z4v8YxtWANrTWb6RFPyfnlW/ootQzYbnhWcATbHWQ=; b=Ah3lShP/t+d6IoJQDnkWvU7Qh42ibzBE//v8ldHa6qFlD5Ve2+DjcAFCwCcQew63E6 gxwop/V9Ho84kpbK1Vzpi52Lvrjy1EKTkaR042Z+TGyow73b6I5wm5/bDjDiSDUe8ZHU JQHVjHuGiO5Wkljn4XDaNnkDnJfwHNabetnaCfd7KMybmA7lUMkq/2vs3K0RMIyCHpJO hGT2BeWn9AQRKBAuwSw6aWp5+CJiYvtzsQm4WRv4Z0hRu/KKMp3uf+2TieEwjMHSzHxT NidqkzeP9nQTsflFMPZzQBT/ul2EDHMtiwc7FDdhZpGxlpwCHvORlnF/UovmW/bPmwr5 uvjQ== X-Gm-Message-State: AOAM532DnpL9oC1qEdm+4gS9oT0UpJxjS0SNV7nFsEuyOXQp0q9YuvHq pi6hGhkNspV+Rcak8X9/UIA= X-Received: by 2002:a05:6402:4301:b0:418:585b:cfe1 with SMTP id m1-20020a056402430100b00418585bcfe1mr12030306edc.250.1647280558842; Mon, 14 Mar 2022 10:55:58 -0700 (PDT) Received: from skbuf ([188.25.231.156]) by smtp.gmail.com with ESMTPSA id e9-20020a170906c00900b006d4a45869basm7154199ejz.199.2022.03.14.10.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Mar 2022 10:55:58 -0700 (PDT) Date: Mon, 14 Mar 2022 19:55:56 +0200 From: Vladimir Oltean To: Tobias Waldekranz Cc: davem@davemloft.net, kuba@kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Russell King , Ido Schimmel , Petr Machata , Cooper Lees , Matt Johnston , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bridge@lists.linux-foundation.org Subject: Re: [PATCH v3 net-next 09/14] net: dsa: Validate hardware support for MST Message-ID: <20220314175556.7mjr4tui4vb4i5qn@skbuf> References: <20220314095231.3486931-1-tobias@waldekranz.com> <20220314095231.3486931-10-tobias@waldekranz.com> <20220314165649.vtsd3xqv7htut55d@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220314165649.vtsd3xqv7htut55d@skbuf> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 14, 2022 at 06:56:49PM +0200, Vladimir Oltean wrote: > > diff --git a/net/dsa/port.c b/net/dsa/port.c > > index 58291df14cdb..1a17a0efa2fa 100644 > > --- a/net/dsa/port.c > > +++ b/net/dsa/port.c > > @@ -240,6 +240,10 @@ static int dsa_port_switchdev_sync_attrs(struct dsa_port *dp, > > if (err && err != -EOPNOTSUPP) > > return err; > > > > + err = dsa_port_mst_enable(dp, br_mst_enabled(br), extack); > > + if (err && err != -EOPNOTSUPP) > > + return err; > > Sadly this will break down because we don't have unwinding on error in > place (sorry). We'd end up with an unoffloaded bridge port with > partially synced bridge port attributes. Could you please add a patch > previous to this one that handles this, and unoffloads those on error? Actually I would rather rename the entire dsa_port_mst_enable() function to dsa_port_mst_validate() and move it to the beginning of dsa_port_bridge_join(). This simplifies the unwinding that needs to take place quite a bit.