Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4304918rwr; Sun, 23 Apr 2023 02:55:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZaqlGqPbYA9VUCbe2HvcxQf+O/Vr7tH5r5fOiiJTtfVu9OXRJRr3BYilVlF8xUhY9DZi7+ X-Received: by 2002:a05:6a00:3408:b0:638:abf4:d49c with SMTP id cn8-20020a056a00340800b00638abf4d49cmr11420263pfb.3.1682243757717; Sun, 23 Apr 2023 02:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682243757; cv=none; d=google.com; s=arc-20160816; b=yP7Pgvvf7asaXMbEDBsm8zPuihJApRsDov3WhuLSRWunmMrGKRqG5O+Shb5wg8oeMB f1nLUDzVfqk1ZnzBFAhlt5eZeHDxpW+2gVVa4G1QwmKBhExqs1x3hvhhMIgpCn2hBV2H 8jWgvVxyw8i1fhQzXKFme0hxysanv2GiTxtIFu8YLHjoUDcOBUGHITeqGAUidZJMAgkT o4oeTq8mt9Z1Sn36X9Nt/NpMxh1SgQkhtC7h6aVx6/veRj19Li9ui43jYr5CiPkJndFg ZsliFe/yYW78qEtPZm/BJAs6kZ0h/ELRW7ckUG5hWs2/m5tt3Rxf9jEkTI7ltDWoIqIw tjeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=vjMzRZ60Za+hnw73OiYTfFAGeI+rmt67qSP7wqBIx1g=; b=HuRHYKl68GfvBONDbSBakU9Opq7lP0/rjvfOMGoPG6Tj21BYUp/Q02FuKD3K8fJFzA zfyXISujmtVSJBeE4k3UVt56zi/CKht7lHu6uwDJ1Ly71mLhkUw9RDBHswgHZSK81gy/ O20R7hKtMJ6lwMb23vt36HhY7jx2RH1W3VZsBVcsmnCqRsQqMZQTmv7ZxOc9jBhGhdtr 8l9Pmy2Lz4Ry0D7N79Pyx0xTlqCTSjUaTmmpzN2fXnEC3/UhGzo0ITV0pABR4RImeTZ1 M/65PEQwBHMlcu8alMg7wOeVLK1WpNg5pQf+Ufge7EOOzOocO8uNunpQbiuTmsBMRZw8 qmGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w127-20020a627b85000000b0063d238b6049si8657848pfc.286.2023.04.23.02.55.35; Sun, 23 Apr 2023 02:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbjDWIuY (ORCPT + 99 others); Sun, 23 Apr 2023 04:50:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjDWIuX (ORCPT ); Sun, 23 Apr 2023 04:50:23 -0400 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDEB01733; Sun, 23 Apr 2023 01:50:19 -0700 (PDT) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id 245ED1883692; Sun, 23 Apr 2023 08:50:16 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id 2043E25003AB; Sun, 23 Apr 2023 08:50:16 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id 1060F9B403E2; Sun, 23 Apr 2023 08:50:16 +0000 (UTC) X-Screener-Id: e32ae469fa6e394734d05373d3a705875723cf1e Received: from fujitsu (2-104-116-184-cable.dk.customer.tdc.net [2.104.116.184]) by smtp.gigahost.dk (Postfix) with ESMTPSA id 94AB891201E3; Sun, 23 Apr 2023 08:50:15 +0000 (UTC) From: Hans Schultz To: Vladimir Oltean , netdev@vger.kernel.org Cc: Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Ido Schimmel , Roopa Prabhu , Nikolay Aleksandrov , Ivan Vecera , Jiri Pirko , Jesse Brandeburg , bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net] net: bridge: switchdev: don't notify FDB entries with "master dynamic" In-Reply-To: <20230418155902.898627-1-vladimir.oltean@nxp.com> References: <20230418155902.898627-1-vladimir.oltean@nxp.com> Date: Sun, 23 Apr 2023 10:47:15 +0200 Message-ID: <875y9nt27g.fsf@kapio-technology.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 18, 2023 at 18:59, Vladimir Oltean wrote: > diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c > index de18e9c1d7a7..ba95c4d74a60 100644 > --- a/net/bridge/br_switchdev.c > +++ b/net/bridge/br_switchdev.c > @@ -148,6 +148,17 @@ br_switchdev_fdb_notify(struct net_bridge *br, > if (test_bit(BR_FDB_LOCKED, &fdb->flags)) > return; > > + /* Entries with these flags were created using ndm_state == NUD_REACHABLE, > + * ndm_flags == NTF_MASTER( | NTF_STICKY), ext_flags == 0 by something > + * equivalent to 'bridge fdb add ... master dynamic (sticky)'. > + * Drivers don't know how to deal with these, so don't notify them to > + * avoid confusing them. > + */ > + if (test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags) && > + !test_bit(BR_FDB_STATIC, &fdb->flags) && > + !test_bit(BR_FDB_ADDED_BY_EXT_LEARN, &fdb->flags)) > + return; > + I do not understand this patch. It seems to me that it basically blocks any future use of dynamic fdb entries from userspace towards drivers. I would have expected that something would be done in the DSA layer, where (switchcore) drivers would be able to set some flags to indicate which features are supported by the driver, including non-static fdb entries. But as the placement here is earlier in the datapath from userspace towards drivers it's not possible to do any such thing in the DSA layer wrt non-static fdb entries.