From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DE081624DF; Tue, 24 Mar 2026 23:31:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774395110; cv=none; b=Bfr0SdUpfNOXgLir2YckfKOi71nPx2ShZDRYFs48CC0x2u1vsJK+oJ8FB1WmC9FCddrPQC31kwHiV2Xw3FkaIxe8kybwB1nub7N+vGpH61cIypLnvxtWFmGOG5CpsJU3VKaDBX2B53NCwesnHYrOwl3p8BEtgOonxZWDI6eZ3vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774395110; c=relaxed/simple; bh=FkWCAwi5D50TjF839k3QTQ8Sse/PwE7yi64JOZy7wK8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HPyJ8dgJ1HpfNezMEY6fSZdbpq8jWAYnFh3tFtUK1wupECUhXCDKxvBjFF3J/QDKPk92X59NmrdFqPms43Y5eCtW7014wke9hRI475sH47vc5A/ms3GT0Cm4pG9MEa9621tyv52bAIMiJhEWOrGbprGTeAbfrcbg3ueJ3dHU4Mo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1w5BDh-000000003Fe-3wwA; Tue, 24 Mar 2026 23:31:34 +0000 Date: Tue, 24 Mar 2026 23:31:30 +0000 From: Daniel Golle To: Vladimir Oltean Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Wunderlich , Chad Monroe , Cezary Wilmanski , Liang Xu , "Benny (Ying-Tsan) Weng" , Jose Maria Verdu Munoz , Avinash Jayaraman , John Crispin Subject: Re: [PATCH net-next v6 2/4] net: dsa: add bridge member iteration macro and port mask helper Message-ID: References: <20260323163104.a2d2hbs7jfgsptj3@skbuf> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260323163104.a2d2hbs7jfgsptj3@skbuf> On Mon, Mar 23, 2026 at 06:31:04PM +0200, Vladimir Oltean wrote: > On Mon, Mar 23, 2026 at 02:29:41AM +0000, Daniel Golle wrote: > > I'm also planning to introduce dsa_bridge_for_each_member macro in > > addition to that which works on (struct dsa_bridge *) and uses > > dsa_switch_for_each_bridge_member. > > I don't like the dsa_bridge_for_each_member() name. You are likely > not considering cross-chip bridging, where a bridge spans multiple > dsa_switch structures. That is also a serious reason why your > bridge->priv design is not viable (two switches can't lay their eggs > in the same basket without overwriting each other). dsa_bridge_for_each_local_member() ? dsa_switch_for_each_dsa_bridge_member() (but that's too close to dsa_switch_for_each_bridge_member imho) I was planning to have both, dsa_switch and dsa_bridge as parameters, of course, limiting the scope to a single dsa_switch.