From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D561C4338F for ; Fri, 20 Aug 2021 16:11:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A47D61040 for ; Fri, 20 Aug 2021 16:11:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234436AbhHTQMN (ORCPT ); Fri, 20 Aug 2021 12:12:13 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:43365 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232191AbhHTQME (ORCPT ); Fri, 20 Aug 2021 12:12:04 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 681EC580B2C; Fri, 20 Aug 2021 12:11:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 20 Aug 2021 12:11:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2E5gdo EF6QrlL7F8ylK1rXT/69p82PiHW1YUnttvd3k=; b=gmWevCmJo2ZRGtrtBI6RxE +P3Hm/qtw6DoT/nsulN1Bh2YKvZvDHIXP9zB8Yav6SqKGTLZ3GVk81BmbUwEQaC4 tfXqp/cxDoQkxGkdxqijelRWuwcbiG4Fu+1GCe58snvKVATgLcj3yI1EvCPA8j7W MfEtmP6+8xGT8w/IkMHnB+ZBjCQD/g6LN2VACbOdw4KRDx0clr8LRi2QGwwfK2yy yYmKXxrISy0FGA7wVRopVL1TvoWh1ioFzDEX64HEI3YKxsNQ8UBexHMIvEFsjBH8 8DSvcr/80JS37ogjeayp1WKWFQqgIY4UXE1nvD7/7YechMDo2lwqht9Mh5quIO0w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleelgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepkfguohcuufgt hhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecuggftrfgrthhtvg hrnheptdffkeekfeduffevgeeujeffjefhtefgueeugfevtdeiheduueeukefhudehleet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguoh hstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Aug 2021 12:11:20 -0400 (EDT) Date: Fri, 20 Aug 2021 19:11:15 +0300 From: Ido Schimmel To: Vladimir Oltean Cc: Vladimir Oltean , netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Roopa Prabhu , Nikolay Aleksandrov , Andrew Lunn , Florian Fainelli , Vivien Didelot , Vadym Kochan , Taras Chornyi , Jiri Pirko , Ido Schimmel , UNGLinuxDriver@microchip.com, Grygorii Strashko , Marek Behun , DENG Qingfang , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , Sean Wang , Landen Chao , Claudiu Manoil , Alexandre Belloni , George McCollister , Ioana Ciornei , Saeed Mahameed , Leon Romanovsky , Lars Povlsen , Steen Hegelund , Julian Wiedmann , Karsten Graul , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Ivan Vecera , Vlad Buslov , Jianbo Liu , Mark Bloch , Roi Dayan , Tobias Waldekranz , Vignesh Raghavendra , Jesse Brandeburg Subject: Re: [PATCH v2 net-next 0/5] Make SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE blocking Message-ID: References: <20210819160723.2186424-1-vladimir.oltean@nxp.com> <20210820104948.vcnomur33fhvcmas@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210820104948.vcnomur33fhvcmas@skbuf> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Aug 20, 2021 at 01:49:48PM +0300, Vladimir Oltean wrote: > On Fri, Aug 20, 2021 at 12:16:10PM +0300, Ido Schimmel wrote: > > On Thu, Aug 19, 2021 at 07:07:18PM +0300, Vladimir Oltean wrote: > > > Problem statement: > > > > > > Any time a driver needs to create a private association between a bridge > > > upper interface and use that association within its > > > SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE handler, we have an issue with FDB > > > entries deleted by the bridge when the port leaves. The issue is that > > > all switchdev drivers schedule a work item to have sleepable context, > > > and that work item can be actually scheduled after the port has left the > > > bridge, which means the association might have already been broken by > > > the time the scheduled FDB work item attempts to use it. > > > > This is handled in mlxsw by telling the device to flush the FDB entries > > pointing to the {port, FID} when the VLAN is deleted (synchronously). > > If you have FDB entries pointing to bridge ports that are foreign > interfaces and you offload them, do you catch the VLAN deletion on the > foreign port and flush your entries towards it at that time? Yes, that's how VXLAN offload works. VLAN addition is used to determine the mapping between VNI and VLAN.