Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2415961imw; Sun, 17 Jul 2022 08:18:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsXg1GzqX4ntC1haF3nW7Omc/lfGVrwvaEHSlLvv7q5Aej/wWiqoOQpI6A0mfIANoK8S01 X-Received: by 2002:a17:903:2ca:b0:16c:d18d:bb51 with SMTP id s10-20020a17090302ca00b0016cd18dbb51mr10265762plk.33.1658071120819; Sun, 17 Jul 2022 08:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658071120; cv=none; d=google.com; s=arc-20160816; b=y13io94kyo3cYMhNB64T4PAPbrpdlN0xMd19KqaAfw5A7ZnvQy4KX98+1ZhR8bVgcR OzIwq3hfny+eDZtxLbVWf/bDjaWqxecq4jEl3eus98i6SfvBVnkX0dMmcFkhzadQ/jJC 5aRovKLyZt3BiA6ArfmzRaoInZ9aOGYwbIq1G0X8Bl+VZmE2ZgpV9Kh/kQYKO5JcdkAv 8vJSzXcz61wf5GOo8zNc62P9qEiTUn5S6IZWLXyFUK8BXqcZwF0hhxtStAjY2Lbyiyl+ 3Xeqkw9G9JdGBZerb18YiTKjGt5tBOC1KJOa4wpLBJefBfYdtK8oeGlbZk3l8pkJ8zPG 7oBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hMG19jnX3PRCbXZ+on0hHKlUdqbr9JhdKfsdJnBO8LI=; b=D+KhN3n2iMbUoWy83LCmpAjoh3K8hBQCNdSXD3oNrFCO+eICxT0n/bhvTfTO9xqZts Wiq8r6ccakIBNYktyMPrjx4rj5+/g4pdowYKJW7CTR7n59wUjYsDA0zYEnELVoFI1iII /xirsW+FeU9VrAin44l7zEEzYtZGsmFqmOEhCFlfLMalUmhGJzev3jEA8M2dqMW6Ikad iakNcVfpM+X27gDIeUPEaauKkdZdj3oYFKPKaRpSONdiX8Syt3LzRrQlirfeeuhs4mIe iMLcv9aoKnJUlu03NHZdmcEzFbMAaCdL1rrtt7ItR+8cpkZy3luxtGoJyui1V8JitDC6 ad4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XtRmz+aA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 81-20020a630354000000b00412a9c29e5bsi9685305pgd.702.2022.07.17.08.18.22; Sun, 17 Jul 2022 08:18:40 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XtRmz+aA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232332AbiGQPI2 (ORCPT + 99 others); Sun, 17 Jul 2022 11:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiGQPI1 (ORCPT ); Sun, 17 Jul 2022 11:08:27 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B2ED13CF3; Sun, 17 Jul 2022 08:08:26 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id m13so2072723edc.5; Sun, 17 Jul 2022 08:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hMG19jnX3PRCbXZ+on0hHKlUdqbr9JhdKfsdJnBO8LI=; b=XtRmz+aAA92yKbmzuHPW3+DHixLtci04vqzmWpp+cD5JXHKeheq9k0sZHk2ikywuVm Ya+X1fi6i6DrekCrRvklz9kah/1l+vUSVxc3/+Mo/b6k5YPNZ+eK3YL+647np6c9eBFP cO9KIo5RMa0ByDF+dwwXR4eyh8YRzFEzuatHQcbyx+ujWJ+4vGcFvAucRKmCNEWoeX4u ThpQlP0hiaeXV53bOTqWltSSKxzTd6zlQxDZCwQuyEK1/Adg0B2cQW9bbz9ObD62iE7U UoYgFTCDsjR1xYb042K9W2yv6zWdzbtgpK2vAbtId8LPh9ThtgW26QkbNbfRzBBH4Lgd xVxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hMG19jnX3PRCbXZ+on0hHKlUdqbr9JhdKfsdJnBO8LI=; b=lScCJPaqaYGE2wpRNPrcw+T863O+5lXlFlICDGBwsLCyDeSnV/vNpGUd1VtxP2zzZN fcaXIxP4r0Udicj8UB5J/kQ1OhsQqQ6i23w3woCFckq5k8YnrMu60v39zUse2JTJpV8N 45bmQIyrNbMtqYih5gUp3JhlbT9oxr1NBJgTBuMiehSA1lb7fN9tmzzhWBIgj2woxl6A gWHV+roZ5yqP4TLFfx3VCgeDv+FhG4x3sNo+mv0vGVntprEJ13GcwMK7mvEbgTnsZsKg poWpTg/PLWxwPGOFyz2jHOTXfNDzEgYJvc1Pe4hmVpm/bi3qY+Buo1FobwCcGBkbG9pU 7LbA== X-Gm-Message-State: AJIora+fKtX/JanxU2EmWxo+RhXS8IMZWEvX2eLPqm3n8grZ66kuU6QF V8xuf9DSO7BIxVPqGijGfFw= X-Received: by 2002:a05:6402:4504:b0:43b:4ec7:2ec1 with SMTP id ez4-20020a056402450400b0043b4ec72ec1mr11287321edb.7.1658070504655; Sun, 17 Jul 2022 08:08:24 -0700 (PDT) Received: from skbuf ([188.25.231.115]) by smtp.gmail.com with ESMTPSA id d2-20020a056402000200b0043a61f6c389sm6832967edu.4.2022.07.17.08.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 08:08:23 -0700 (PDT) Date: Sun, 17 Jul 2022 18:08:21 +0300 From: Vladimir Oltean To: netdev@kapio-technology.com Cc: Ido Schimmel , davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Eric Dumazet , Paolo Abeni , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Daniel Borkmann , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 net-next 3/6] drivers: net: dsa: add locked fdb entry flag to drivers Message-ID: <20220717150821.ehgtbnh6kmcbmx6u@skbuf> References: <20220708115624.rrjzjtidlhcqczjv@skbuf> <723e2995314b41ff323272536ef27341@kapio-technology.com> <648ba6718813bf76e7b973150b73f028@kapio-technology.com> <20220717125718.mj7b3j3jmltu6gm5@skbuf> <20220717135951.ho4raw3bzwlgixpb@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Sun, Jul 17, 2022 at 04:57:50PM +0200, netdev@kapio-technology.com wrote: > > Maybe I am just trying to understand the problem you are posing, so afaics > MAC addresses should be unique and having the same MAC address behind a > locked port and a not-locked port seems like a mis-configuration regardless > of vlan setup? As the zero-DPV entry only blocks the specific SA MAC on a > specific vlan, which is behind a locked port, there shouldn't be any > problem...? > > If the host behind a locked port starts sending on another vlan than where > it got the first locked entry, another locked entry will occur, as the > locked entries are MAC + vlan. I don't think it's an invalid configuration, I have a 17-port Marvell switch which I use as infrastructure to connect my PC with my board farm and to the Internet. I've cropped 4 out of those 17 ports for use in selftests, effectively now having 2 bridges (br0 used by the selftests and br-lan for systemd-networkd). Currently all the traffic sent and received by the selftests is done through lan1-lan4, but if I wanted to run some bridge locked port tests with traffic from my PC, what I'd do is I'd connect a (locked) port from br0 to a port from br-lan, and my PC would thus gain indirect connectivity to the locked port. Then I'd send a packet and the switch would create a locked FDB entry for my PC's MAC address, but that FDB entry would span across the entire MV88E6XXX_FID_BRIDGED, so practically speaking, it would block my PC's MAC address from doing anything, including accessing the Internet, i.e. traffic that has nothing at all to do with the locked port in br0. That isn't quite ok.