Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp302470lqp; Thu, 4 Apr 2024 13:43:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUs9OE0EG8l4Qym7Px5SIxS2hVD822wdqq0+P87Lfk8zqZqsCJayxZyQb6kjYh0FLTl1UYrfJ5zAMXSKEHxI0YrLQPEdKbfaDfVfKg24g== X-Google-Smtp-Source: AGHT+IHLisgD0SNdmNQi/P/Cr/5KW9RkfiuuOXkP4gt9dmlC2XyNY8rE3nSL/iemzwRka0uQyFJ4 X-Received: by 2002:a50:8ade:0:b0:56d:ed86:c6f4 with SMTP id k30-20020a508ade000000b0056ded86c6f4mr2439937edk.11.1712263435571; Thu, 04 Apr 2024 13:43:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712263435; cv=pass; d=google.com; s=arc-20160816; b=laI8bOmtxAgdBbnzEA/8phWLgWmCG45p5ElO/22QQ9aVZn1OVqHbeniDiS+D7KfxUu Y37Sz2lyQgEWxWhWWNdSYQlr+1J/6+jkg2SfvrVO/3yBQPMySMKCd9bQchiPbwjU/zwI md/jAErTCe8YOugCPLcBXhuAmH1utfAfDCpxEzOiXFKHTzP9c2hPVRqAyBQuPgbSV+0I z9jUQ7rpuYX+Wjei+bWrJ9U8F0a9EtsAoGm2WrvtRk+gVwygfqgskE42fy7awBR3omqo 39Kct3kqjXNVxq2d0hdOQhte50C+LyZzdXtPP+Ny88+R97zDpgWH6Ju1rclqigeGB7Sv BziA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=OKmfpV6KrJ0i98Wh/0eskG0hyAllvgPjh1mOsK1t4hU=; fh=qbn7o17QL0k5euk0CZyHbEYl+UnN3HDgtg1p8Q9pn3Q=; b=XtGB9w+/2HqqAzB/ty1BU/FH9I40ifyC6iO4DMWgqqiHHN9bm1/SgC0mC1RSac0aGF siE2ywPgQDZJGp+FDmfe2/nEA3h4zAZyBGc4sIUTuKExycE+CSn025G4+oLSOmIX1sF+ CQXTZl5KLBLQ9IL4AmlYxELUwWWqlDPnRsIUHfpA59zj9ipatodkC8KaktKYilpS0z2G /y2osEYP4KWQ1SwKDL1sFl0W0DH+4azLQqHdEDcidVOTgwoFGVmOE3hQJLtTvzyy8o4W IRG/t3jQFxAfMVh6dBhLoNtbAokUkkCDozZQc2nGlYfCHBsqCHjtzCTBLaMsR66QuzkV FgEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=I1ImY5ow; 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-132108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132108-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 g39-20020a056402322700b0056c27be726fsi26675eda.64.2024.04.04.13.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 13:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132108-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=I1ImY5ow; 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-132108-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132108-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 51B651F23910 for ; Thu, 4 Apr 2024 20:43:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 360D713A86C; Thu, 4 Apr 2024 20:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I1ImY5ow" Received: from mail-yw1-f195.google.com (mail-yw1-f195.google.com [209.85.128.195]) (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 0158E1292CE; Thu, 4 Apr 2024 20:43:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712263423; cv=none; b=G6gQH0Xj6BSMEkJ5rMiDZE/j/DJwx2VA25ZzHCoekLnwpg+3iFL5MJFD3VA1H3Nt18muZRzii5XhL8cUWV7dpzAl3iAlzYD7zhABofnGy1HPUNmDyMLL4p+65fO4Pg9n4/00M5zU4aHoG8iBzPN0CihxA5TXmfzlmbJLy43cf9c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712263423; c=relaxed/simple; bh=oJzU1DchjJ7xBagvA/BSZcE6n68phH2iAnsMriy52xs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hx2Bfig2uWjUW022yHcoRHalzFCpyEXcv9Qb1gFaLFDZNQRiOouZWxHxCxEZCIFeOl5A2JqQDeDSw1kJMP/qEPyNztGa8qYApwwJN+iVosjFnYbLwSSWkmc4qXNtUf0vlvtVRdc7ieob1Giudp0vgAvWmmbw0NKHXZ9eazIuT1o= 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=I1ImY5ow; arc=none smtp.client-ip=209.85.128.195 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-yw1-f195.google.com with SMTP id 00721157ae682-60a104601dcso16022327b3.2; Thu, 04 Apr 2024 13:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712263421; x=1712868221; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OKmfpV6KrJ0i98Wh/0eskG0hyAllvgPjh1mOsK1t4hU=; b=I1ImY5owmZqE6IhCJvRkMtcG9dxv8wOr4SVu739HRdzyDC4ZZn7Fv5i1oXlLaiyurv unwgbO+aKznCtdpcFQ6VhEclpss9MRwC2WSuKjJYlm+XOtDkYsdCa0iRQGar1Bk6xAwu kKZfHcXHHph0FO3SQx+5o2zDhELgdBq1aTXeMH48gaOVVNEaCqUZgjr14E4DJtLnWHRe p/SzoQiqCnNd9W7clTWya74E+U6lnZb+DUuzVeIem01OnAKJWt7fqmnKfkCV4ywuNvt9 gWMeDFfuANj4ycGe/nuR9bbW1DBPcDd0MPQOOy6DpqT4BvwsAp7d1qr7uHp+gaaLqe+I LZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712263421; x=1712868221; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OKmfpV6KrJ0i98Wh/0eskG0hyAllvgPjh1mOsK1t4hU=; b=nnuvnQZ/+rPNYQe/IoQr6IEgZhTo8XIWhYJ74Qa8Ob4L/MKfbrw38/ttAkBW40wsR8 RTUBOCOhXrmgdCdV9dI6rS5rlpzxVpsB4e86+8nznTQM1DSKcrf+kCJebuiO9/R/4orA mvfohnR9xysR0C1o1BFzNPtMhzn4asvNGcnp7VB8Dvg+QbA4RR5gOeo3j0DbPVrDx3LF O8PrVkdiWllf+TDf37tZmbMPnhN/kuifw4TCgfSJ2IgGyCMhLHEV1fZaTZlyKXthQUO0 kazFBYSA+fnufl4EWXy7LkAQUG9lA4ziCrTzxMscZkapqfdNVisSiKwCmCjFlPDyEujC JzqQ== X-Forwarded-Encrypted: i=1; AJvYcCUNLDLvsNpt/+Dg8DvlUAj/80l899PP0y3X+/+MoZ+pU3JkkdCL30SOMRkx6/1xyNpQqenlIG9yG4azvWPeRPE64SlzzLKLF3b5EhEX X-Gm-Message-State: AOJu0Yww/lmYJGwRRhFC+TVY/e7tU6dbfjBiMnj4lkzbH98sfHetRa3r NiRyNLAOJ8l+DvAwJuTJAGOLpbrX6PpWVLbFjMZmB2Lyd3ToBe/d X-Received: by 2002:a0d:ca01:0:b0:615:1ba3:5732 with SMTP id m1-20020a0dca01000000b006151ba35732mr3527710ywd.11.1712263420902; Thu, 04 Apr 2024 13:43:40 -0700 (PDT) Received: from [10.102.6.66] ([208.97.243.82]) by smtp.gmail.com with ESMTPSA id if3-20020a05690c690300b0061511220f16sm45006ywb.92.2024.04.04.13.43.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Apr 2024 13:43:39 -0700 (PDT) Message-ID: Date: Thu, 4 Apr 2024 16:43:38 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC net-next 07/10] net: dsa: mv88e6xxx: Track bridge mdb objects To: Vladimir Oltean , Joseph Huang Cc: netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Roopa Prabhu , Nikolay Aleksandrov , =?UTF-8?Q?Linus_L=C3=BCssing?= , linux-kernel@vger.kernel.org, bridge@lists.linux.dev References: <20240402001137.2980589-1-Joseph.Huang@garmin.com> <20240402001137.2980589-8-Joseph.Huang@garmin.com> <20240402122343.a7o5narxsctrkaoo@skbuf> Content-Language: en-US From: Joseph Huang In-Reply-To: <20240402122343.a7o5narxsctrkaoo@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Vladimir, On 4/2/2024 8:23 AM, Vladimir Oltean wrote: > 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. > I thought about implementing an MDB iterator as suggested by Tobias, but I'm a bit concerned about the coherence of these MDB objects. In theory, when the device driver is trying to act on an event, the source of the trigger may have changed its state in the bridge already. If, upon receiving an event in the device driver, we iterate over what the bridge has at that instant, the differences between the worlds as seen by the bridge and the device driver might lead to some unexpected results. However, if we cache the MDB objects in the device driver, at least the order in which the events took place will be coherent and at any give time the state of the MDB objects in the device driver can be guaranteed to be sane. This is also the approach the prestera device driver took. Thanks, Joseph