Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp509273rwe; Thu, 25 Aug 2022 04:37:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bhZw0gQO6fu1qXjDYgac50kcGdWe5djDoMH+qVQCTPUP710ks75nVPDPVt8HLhLDOB3If X-Received: by 2002:a17:902:f712:b0:171:29d0:6f9f with SMTP id h18-20020a170902f71200b0017129d06f9fmr3443461plo.84.1661427451712; Thu, 25 Aug 2022 04:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661427451; cv=none; d=google.com; s=arc-20160816; b=tnfvIZG7mb8RZ76W0Mwl8Kz9PpXUmWkQxCfXouE8ByUONEsy4NO9j0EGEuOYYujlSe ATKBMkrnoZoPRPshJN1Kx3bfXS8eBJFA5BfRudXngFbNzzDEDahs/EyDHV93eE4HMNQL BC3HUmiEvpeV7Q6DtOZmSHzcftM1jznS7+yFHm4mNMtP8jp7G/qJNWjwPrWkCQLER5ia eascGeyAriHkZxQs4il01+82HPhz7FqSYksx9UdkB+upDuPveg9xFnnO+Oaq9PRjhyiv FoYPc6kelvaMBTwZdCpDqW1IBtcuts6U7li0eVwHWWfm6LDlWnjONEHBx2m2NXpN4LFA Oyag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=1OwXFAT1bcrB6f5DLufEHE3dRHhgjxfkDqzv3INfh7I=; b=ZgGnGOONpzts5dcXTewV7iltUY+4hrN/utbbE1wd2B/p2eAq/jl2fQ6rFR7IQNUAC/ AVf4ExHfXbwcNqGfpzyiqHtj+QLt1RA8BVH5C3TPh0as+SlEYfl87Os6UrXekpEsuHAB 2YAjC8iIwEgd5R4vodgoiz3UXrE4oBgo6oJrJL8QpCpWn8YVeAMYiBDnJYC9rhxKMZPj BYthVG2GpSjWkJHDfS31CgSt4tWW4w+U7iZp2tDUOJ6AyWWrV5jQvXKytdUyiLgoWO8i dlS7BgizUowJhs3KqkX9aLdFb3KbS6JUwEFor4NqvBL9IARd2zYZKDtAwsFSJTArC0S5 AMNQ== 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 c24-20020a170902b69800b0016d86335ae6si6381402pls.164.2022.08.25.04.37.20; Thu, 25 Aug 2022 04:37:31 -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 S233371AbiHYK1L (ORCPT + 99 others); Thu, 25 Aug 2022 06:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235442AbiHYK1I (ORCPT ); Thu, 25 Aug 2022 06:27:08 -0400 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 984BA9BB62; Thu, 25 Aug 2022 03:27:03 -0700 (PDT) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id 4C64118849A5; Thu, 25 Aug 2022 10:27:01 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id 35EB525032B7; Thu, 25 Aug 2022 10:27:01 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id 2BD179EC0003; Thu, 25 Aug 2022 10:27:01 +0000 (UTC) X-Screener-Id: 413d8c6ce5bf6eab4824d0abaab02863e8e3f662 MIME-Version: 1.0 Date: Thu, 25 Aug 2022 12:27:01 +0200 From: netdev@kapio-technology.com To: Ido Schimmel Cc: Vladimir Oltean , 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 In-Reply-To: References: <5a4cfc6246f621d006af69d4d1f61ed1@kapio-technology.com> <34dd1318a878494e7ab595f8727c7d7d@kapio-technology.com> <7016ed2ce9a30537e4278e37878900d8@kapio-technology.com> User-Agent: Gigahost Webmail Message-ID: <7dfe15571370dfb5348a3d0e5478f62c@kapio-technology.com> X-Sender: netdev@kapio-technology.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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 2022-08-25 11:23, Ido Schimmel wrote: >> >> >> Ido, I am not so known to the selftests, so I am wondering why I don't >> see >> either check_err or check_fail fail, whichever I use, when I think >> they >> should and then they are not really checking... >> >> >> local mac=10:20:30:30:20:10 >> >> >> $MZ $h1 -t udp -a $mac -b rand >> bridge fdb show dev $swp1 | grep -q "$mac vlan 1 master br0 >> locked" >> check_err $? "MAB station move: no locked entry on first >> injection" >> >> $MZ $h2 -t udp -a $mac -b rand >> bridge fdb show dev $swp1 | grep -q "$mac vlan 1 master br0 >> locked" >> check_err $? "MAB station move: locked entry did not move" >> >> What is wrong here? > > Did you try adding a sleep between mausezahn and the FDB dump? At least > that is what learning_test() is doing. It is possible that the packet > is > not sent / processed fast enough for the bridge to learn it before the > dump. > I missed the call to log_test at the end of the test. >> >> For a mv88e6xxx test I guess I can make a check to verify that this >> driver >> is in use? > > Not in a generic forwarding test. Maybe in > tools/testing/selftests/drivers/net/dsa/ > > My preference would be to get as much tests as possible in > tools/testing/selftests/net/forwarding/bridge_locked_port.sh. I now have a roaming test in tools/testing/selftests/net/forwarding/bridge_locked_port.sh, but it will not pass with mv88e6xxx as it is meant for the SW bridge. I can check if the sticky flag is set on the locked entry and then skip the test if it is. The bridge_locked_port.sh test is linked in tools/testing/selftests/drivers/net/dsa/, but if I cannot check if the mv88e6xxx driver or other switchcores are in use, I cannot do more. > > I'm not sure which tests you are planning for mv88e6xxx, but we can > pass > / fail test cases based on the flags we observe in the FDB dump. For > example, if the entry has the "sticky" flag, then the expectation is > that the roaming test will fail. Otherwise, it should pass.