Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2777603rdb; Tue, 12 Sep 2023 11:44:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFI0B2y9ezHYaAe/EneeIqZVcf30/hU2cG0jip7aAN80CgLCIdiwSH614dXDROcChvCioxD X-Received: by 2002:a05:6a20:7289:b0:153:5832:b31b with SMTP id o9-20020a056a20728900b001535832b31bmr264340pzk.53.1694544279775; Tue, 12 Sep 2023 11:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694544279; cv=none; d=google.com; s=arc-20160816; b=XXRu/9Nr3qvsKguKPnytoJBteUyXZFeyLNAGkHAXgr1ykIynT3aOQcTrXxKMHpXAuX TwvYAhQms0zHkPLiA4GVaeIsdGU/ITFaq1kuw9fzMB29+pXNJNqeFsx8Qh5vjjG11vXq ke5mWWXzxowiBANLmyKYEOFjzwKwqwz9TmMAavvhHC8IA+Zttp9M+atl95qTLPHDAV1L yfCNCtjtCAS2UfGNwZzAwo6rARa8/HLgU6P41zwMAPBy2iTYvKutlJtwhTgew+SPQtVU 60P/x1MDHveMkd20kKHwBDrvtRgC1d44Sty/FuXc75n+NiU5swZDW1ueIzZ7s9Ie/FgB aHaA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/Jg3m+l3nv9mAWoSPMXyNeTwQN5jCAeTIcsjB6I5Pck=; fh=XF8JFY7CY0fqrP5PaeQAV6eMd+ZiSjjP2/ftkfuenak=; b=uni36xyUwERvl/CVSS42PZgFB6GwSnxuWxzCcvaZq9bmEml39ZpUBScSvn7WERdgt5 Cppga6K1XJfPTvcnIUHy8u84NkdqN0Zr1wT2qos6JwRlwMH6qVioT02zY9viYR9oV1WO YnTh1jIUvxR6W8GeT8bImvtUaF4B28qErYxilGABYQdoPVtUmYxt4K1F7AgpKLIhF0ar lWaXErCAxbpn7fyRkSlXusp7aa+QlzgxsQZUMNkmP9d52+eKS6TfJc3K3RGxOfrPf5Pz Z4nz7ZNMGmAF6YOKdAziLZA9rZXUrCDXaM/j0yAWbxtEx1oT976oW4Fv587bvcW2yS0X 9rbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nzxxPFgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id cq12-20020a056a00330c00b00682759c6440si8438698pfb.40.2023.09.12.11.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 11:44:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nzxxPFgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 37F2280C774F; Tue, 12 Sep 2023 08:42:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbjILPmO (ORCPT + 99 others); Tue, 12 Sep 2023 11:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbjILPmN (ORCPT ); Tue, 12 Sep 2023 11:42:13 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 846DE10DE; Tue, 12 Sep 2023 08:42:09 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-401bbfc05fcso63864235e9.3; Tue, 12 Sep 2023 08:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694533328; x=1695138128; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=/Jg3m+l3nv9mAWoSPMXyNeTwQN5jCAeTIcsjB6I5Pck=; b=nzxxPFgmWjz35pMQvdo4qwF0o7l1v6GKKErvZsQFIVoOHm+fpClhoxEgNgTdicGKB8 v0mDzMmPsmLb+HiTi0EkSSBfxrs+mBUQBX5ef7H+tcEXDqFLbVCdxHwto60xkXG2VGyp s9Y12RW1a1jkCuaeQxVI1Sq9ElVg0SuR9s1grewe72DngR6Jex9wyqF+2D72QqJFWImI 7caBrQJ9Cbs/SijD5UQx7S0Pl9DiZVwtDsVhT6XUodCAIWHsJgb4musd/6BKcWqhCg1D nAro8pPoRcqVqVRSvjwbw/QSijuAZow2SSIkqNspk0dN7W8Cm2lRTB79BTubJhx3uqNi wm/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694533328; x=1695138128; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/Jg3m+l3nv9mAWoSPMXyNeTwQN5jCAeTIcsjB6I5Pck=; b=L2NFcYBFELYOm7APOgKjHexuNR3gHdDDRf8vP/0pe1XQ2TE+f/br8Pgw1rzAQguVvv X/RSgtSt9aVLJhDZfkEao2ZeeBOXqsApEk2MMkiKombvmaObrDg6ymiNqz5vMrMhTusr mohljAZ1x0lfazUHAlFrV/m9gMZXFH541bVOFG33jQfatpV6G7q3vigHV9XrPeO7d4JU zHv1a1OPqcBS/YiKWaPVt3rMhGXeufGaBxmvI170BAb4NL0zTyF8oIBojeHZcs/rXpLA VWu5mCk4ktxBwWvPq9jR8IE/DBa6V+OsIS9s2agVZ0D6epemsH7ElhhlqV8UaqTdPvmS EFqA== X-Gm-Message-State: AOJu0Ywyo9XX6HgerNZSZpP4Fm+5Gkkm3dLb+TZB8rW5AhMYyzqJRH6Y v7lA+hg+0L6uoP+WdjbnlPM= X-Received: by 2002:a05:6000:10c:b0:318:f7a:e3c8 with SMTP id o12-20020a056000010c00b003180f7ae3c8mr9730024wrx.57.1694533327618; Tue, 12 Sep 2023 08:42:07 -0700 (PDT) Received: from skbuf ([188.25.254.186]) by smtp.gmail.com with ESMTPSA id a5-20020aa7cf05000000b0052576969ef8sm6058701edy.14.2023.09.12.08.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 08:42:07 -0700 (PDT) Date: Tue, 12 Sep 2023 18:42:04 +0300 From: Vladimir Oltean To: =?utf-8?B?UGF3ZcWC?= Dembicki Cc: netdev@vger.kernel.org, Dan Carpenter , Simon Horman , Linus Walleij , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 4/8] net: dsa: vsc73xx: add port_stp_state_set function Message-ID: <20230912154204.633wv564dih3p6we@skbuf> References: <20230912122201.3752918-1-paweldembicki@gmail.com> <20230912122201.3752918-5-paweldembicki@gmail.com> <20230912144802.czdpb6hpn2yiewvf@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Sep 2023 08:42:15 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email On Tue, Sep 12, 2023 at 05:27:45PM +0200, Paweł Dembicki wrote: > > To forward a packet between port A and port B, both of them must be in > > BR_STATE_FORWARDING, not just A. > > > > In this patch bridges are unimplemented. Please look at 8/8 patch [0]. > > [0] https://lore.kernel.org/netdev/20230912122201.3752918-9-paweldembicki@gmail.com/T/#u Yes, but vsc73xx_port_stp_state_set() remains unchanged until the end. What am I missing? In your implementation, nothing prevents port i (which is in BR_STATE_FORWARDING) from forwarding packets towards a port j, present in vsc->forward_map[i] & BIT(j), which is *not* in BR_STATE_FORWARDING. If you don't have access to the STP protocol yet, you can put port j down and it will go to the DISABLED state and you can confirm that other ports in the bridge will still remain configured to forward to it. > > > diff --git a/drivers/net/dsa/vitesse-vsc73xx.h b/drivers/net/dsa/vitesse-vsc73xx.h > > > index f79d81ef24fb..224e284a5573 100644 > > > --- a/drivers/net/dsa/vitesse-vsc73xx.h > > > +++ b/drivers/net/dsa/vitesse-vsc73xx.h > > > @@ -18,6 +18,7 @@ > > > > > > /** > > > * struct vsc73xx - VSC73xx state container > > > + * @forward_map: Forward table cache > > > > If you start describing the member fields, shouldn't all be described? > > I think there will be kdoc warnings otherwise. > > > > Jakub in v1 series points kdoc warn in this case. I added a > description to the field added by me. Should I prepare in the v4 > series a separate commit for other descriptions in this struct? Yes, but please hold off posting it until I'm done reviewing this version.