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=-2.8 required=3.0 tests=BAYES_00,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=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 1F680C4338F for ; Fri, 20 Aug 2021 10:49:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED1D860FDA for ; Fri, 20 Aug 2021 10:49:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237182AbhHTKuc (ORCPT ); Fri, 20 Aug 2021 06:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbhHTKua (ORCPT ); Fri, 20 Aug 2021 06:50:30 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC515C061575 for ; Fri, 20 Aug 2021 03:49:52 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id x11so19482191ejv.0 for ; Fri, 20 Aug 2021 03:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7isrxJtlp0r22J+iexNuvfburw69U97Ape1SC3iuf7E=; b=gdGakSHq38yULKmpkgy/9jM/jlrCe5SZeLjVuj+14KVzRhp3HGZbJDHIUd7rUGBqB0 20+MaxsWefAdi5WXEtDTWIgXLQNTqwdAgefkZrl0UupWiPPSgUWL4gm3AHlZpjgoUTln RiFq00sS5K1efhCIaSGk3pu4o5V5fTAZ18e9ugWozj1HFIAYy3dH72zBz98jmQa6C3oz sUWvVrSm4wXKtQWdrywsrpUXcSp2IttMdLU8PlKJ4VlX0tbH+7Mb3rSmDbvcCiupNKOm TtCNMyQsER0AuAbOoDhr65J8bFswoJ05cMeQ+910xcXHzvLQ6MI8uZtLg9SPKLZwXq33 w1QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7isrxJtlp0r22J+iexNuvfburw69U97Ape1SC3iuf7E=; b=NcU4Zmk7rfzZw6LRNmy4Tq2YNX7s/iBl/UMQSJ2Qj4uzENpETJW1MNow2xSgeQ8OEa 1eVGo+e/bTWX1siWTJUVwq4MQ7iUefxylRF6/et5UFLu+n2DyFhibHxRYYc1+2D9LLqr rADWgxvzHB3m49KecRn07MnUMa3qeb3SFaEd2vQewbF0vb4kujb0CbtyFjg+D5utyEfN MDeUE9fdQWFoZInaYPk11GL66qd8ko1CC6DuZ/YP1s74ietdB2tSBOJf9G/0S92+/Hcy jL4g8zhm6qeHySKjWIDM+91vVeszVyqcRdNujYBM2G53yO0wj+SofkO1shSwPH8NJ+q5 L1tQ== X-Gm-Message-State: AOAM530ErdySnRvCOfkaQ5+j/DR+lQv5UHMzwm95Mdz9CB4fFkbEsY0o foG5Hlw88p8ppB3eSLck9dQ= X-Google-Smtp-Source: ABdhPJySybXjBmQSQyTOrZkqRi9TKGwofYysZBr8hJwc46IPpkJh4onb50TB3AsPz/aA3P/mfhyfnQ== X-Received: by 2002:a17:906:2642:: with SMTP id i2mr21578744ejc.323.1629456591486; Fri, 20 Aug 2021 03:49:51 -0700 (PDT) Received: from skbuf ([188.25.144.60]) by smtp.gmail.com with ESMTPSA id u23sm3308197edx.29.2021.08.20.03.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 03:49:51 -0700 (PDT) Date: Fri, 20 Aug 2021 13:49:48 +0300 From: Vladimir Oltean To: Ido Schimmel 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: <20210820104948.vcnomur33fhvcmas@skbuf> References: <20210819160723.2186424-1-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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?