Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2027124lqz; Tue, 2 Apr 2024 05:24:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuhtoGXjKPF70ESow1dpmSmg0Gd58FNWhijI3DXb9dolteJPYFQjF4orPyqk5joNmT7kZwt1+rMl0pilAxXsYySketjSH9DAeyK+R//A== X-Google-Smtp-Source: AGHT+IH2V3xG4cLhBiD+Hk07e/GyiX0SPNwwSS0yVe6rpneJDzqspmS2TLCu/hj5HHeiIiZLsTpN X-Received: by 2002:a05:6402:4311:b0:56c:1696:58a8 with SMTP id m17-20020a056402431100b0056c169658a8mr11607305edc.0.1712060645517; Tue, 02 Apr 2024 05:24:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712060645; cv=pass; d=google.com; s=arc-20160816; b=MVcHbBdw4n9Jj+pCpj3pZBQiMdAujaEO4PoUa4jyOgHGUtff37hlFFy8hxEF6MSUPb efdobU7LHmNF8sW9Ez/taO+7pc8CpzBGt+ngX9fjGmSAvhMMfZUxOWxFHGu5v85RH2pi 4kOpyaTRasQcQORQbQLrJhQiB7lewJ37/WpSs41Wn7Zs+LvzcbwuPPtSAhMA5Fjd/hvW H4kncAyyqud0cSDHs9t9VFnQAx2KgOdyJ1IyYRuPDGCpH1BFLE9ek1QoUncfBnfyXVDk ql499YyLec4XGialXlAX0yiZ5ZWx5n7A/HJp0M5K5PuqXlt9+WY2Mahp2nuCmt/L9qS5 Umlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/unssVqP/tBj5M6lSsNX5+k+FjirzQl74biGWZLi7vY=; fh=WWS0rN/spR9SekZozyWdpng970siP6HoCuqsYslkKW8=; b=bixOFanbvHil5V1Xt6bWR3zVj74fyd+499R5IgEzMyAfeYpHB7If6G6MeEdGbMfRzO GT86MDcq4p0rqLp6YtBcnnpU9E7XMp+FMj0YfLUqInyuX4o02ZhA4Vj2LL7eMhOm4hXe 4yLdXjyUjKitqjwK4iupY0zOgwxHWv+il/UBof3e36ch/V+h9VxuMTEch7VSgdxGafqA f6TYpCG8AtnLC/yg41a7Ycy+Odwpl71WA2snr61wgoOm7/euN8TXNuxdZ0bWpXvYf/5/ ysIPi+DSjrtK471dFvJQQFnoaMsL7V9l1/elfxiR1DLI7077l1CSAF71K/yjyxsCGD3K OhKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="JXRs1/Pd"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-127931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i7-20020a0564020f0700b0056b9b4d969dsi5970144eda.351.2024.04.02.05.24.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 05:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="JXRs1/Pd"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-127931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3C7191F21F42 for ; Tue, 2 Apr 2024 12:24:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D97578B4E; Tue, 2 Apr 2024 12:23:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JXRs1/Pd" Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7F5077623; Tue, 2 Apr 2024 12:23:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712060630; cv=none; b=Sl8lH0d5U8lnj58jPts5lJYejhh8R0XuvhpM91hrmL5eLQlKhdEC5aBUAwcXHEO+aRHC/DLpfZIaehjPrrKOLw7jm/3Z1nfTkd2BNp7URch4m6NDj2hdnakItjsPshv0iilOaykamayzicVoT4GRZtufz1Q36PhXMx63qkK9l/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712060630; c=relaxed/simple; bh=4QZLZAns8p7vUq4xXyL7Kp528hkrlWGkPY4oiD0R4zY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dNjUywvj48vF6ef7MJx/De4Nxo7BZlOjuKlWPReGwTOpdCeci49Jf+OnGnS25NhTr03LrnEwY0lKx1OsmYWw6M+WHj+EaCnkDoV8fPrNmiv95adjjsAPYuw6+9WdfwEGL0EXwpfvEFf3Lusz7QgnjeBzIWa6XAVoeg9CERfhpac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JXRs1/Pd; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-563cb3ba9daso4975677a12.3; Tue, 02 Apr 2024 05:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712060627; x=1712665427; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/unssVqP/tBj5M6lSsNX5+k+FjirzQl74biGWZLi7vY=; b=JXRs1/PdC/LrklKqT+2oKK5gqLIrkWcUefEX2WzfF1zv6wxSvulPiN5B6fxTgc1JD+ SMOcbNnaRf3k+2LEb3D460f10LDW627pBIDY3xPSCLuvq+awg/LpW1eKbBYtLYhEJhna H6NAXS5eikTFV/Ik53bNzKZn4xO5Zh/frIwON4aKGolB/KKfKR7XNgaMg8+Wv/BRtrIS S6J63rw9RKmoNuhboLEMfZ6tODwQuaw+nkpECrD4SF7gtR9483KMWzbgzY7/n3uzrvlh u1nVmmeghpdTpFIpFa2ZnPj7RVb8QgSbILvI+MawyelilRQX6wyJv6MXvbg3sDRIl9wy SGnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712060627; x=1712665427; h=in-reply-to: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=/unssVqP/tBj5M6lSsNX5+k+FjirzQl74biGWZLi7vY=; b=lLaX0qZ5JrBHnOeoNERG9FRWAb5T4bmHyRTZ6oEacJT9nQzdaFDqvY1K2z6qA9XrqK kw1ilVpDRHXTDZl91gYfCE7nwQeT2fRAhJdVnqWuaF8H6jlPW+8wAKCyPLIWk1NxkhGf 1J+1rOdA9Mowiyw8DD1VfhWtMrT5YeC8nLA6znk7iOa17gfQla7HM593msj0c88V5KLt GJDhh41Kk665AxySSIcCTfqxUMQJSKXuc8h6lJw/M253qlcEETP5y1UiVYUw9qhtnPJZ DFg4SoV0GxDGqiWBNr3I5I3agRIx/wEtRSDqTPE8tezEf7DZulrvpYRaUDiyqmfuVI7b NsMw== X-Forwarded-Encrypted: i=1; AJvYcCWx38W3cfdObRIH8kmITIqHb7NMgkFr8g7NS5MRxvKbEJvWf4oS5+pt48bA9bsugwqh8aIgqSDHgbse+7H/vIlQ728TQhmN2U94E/B+ X-Gm-Message-State: AOJu0Yw7L0B2M+DO9sktBpcBhv31X+XdJ1zmvMQSyjkge8++1PIXdFk5 PmfTpNLXpXuTiJQ+w9OiT4V6t6N95CM9jZ8r5EikcXoMQA5Rcdbq X-Received: by 2002:a17:906:52d1:b0:a44:51c1:733c with SMTP id w17-20020a17090652d100b00a4451c1733cmr9691934ejn.39.1712060626861; Tue, 02 Apr 2024 05:23:46 -0700 (PDT) Received: from skbuf ([2a02:2f04:d700:2000::b2c]) by smtp.gmail.com with ESMTPSA id wr1-20020a170907700100b00a473a0f3384sm6516024ejb.16.2024.04.02.05.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 05:23:46 -0700 (PDT) Date: Tue, 2 Apr 2024 15:23:43 +0300 From: Vladimir Oltean To: Joseph Huang Cc: netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Roopa Prabhu , Nikolay Aleksandrov , Linus =?utf-8?Q?L=C3=BCssing?= , linux-kernel@vger.kernel.org, bridge@lists.linux.dev Subject: Re: [PATCH RFC net-next 07/10] net: dsa: mv88e6xxx: Track bridge mdb objects Message-ID: <20240402122343.a7o5narxsctrkaoo@skbuf> References: <20240402001137.2980589-1-Joseph.Huang@garmin.com> <20240402001137.2980589-8-Joseph.Huang@garmin.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20240402001137.2980589-8-Joseph.Huang@garmin.com> On Mon, Apr 01, 2024 at 08:11:06PM -0400, Joseph Huang wrote: > Keep track of bridge mdb objects in the driver. > > Similar to the previous patch, since the driver doesn't get explicit > notifications about mdb group creation or destruction, just create > the mdb group when the first port joins the group via > mv88e6xxx_port_mdb_add(), and destroys the group when the last port left > the group via mv88e6xxx_port_mdb_del(). > > Use the group's L2 address together with the VLAN ID as the key to the list. > Port membership is again stored in a bitmask. > > Signed-off-by: Joseph Huang > --- Can you comment on the feasibility/infeasibility of Tobias' proposal of: "The bridge could just provide some MDB iterator to save us from having to cache all the configured groups."? https://lore.kernel.org/netdev/87sg31n04a.fsf@waldekranz.com/ What is done here will have to be scaled to many drivers - potentially all existing DSA ones, as far as I'm aware.