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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 545E0C761A6 for ; Thu, 30 Mar 2023 19:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DvP1+kkisxUu0czwIrNwF+zvfijal/Q9h/dviP+IWzo=; b=0o01Quls6B5OF5 MLEJhQLg0OxlHZoQSFAtboSx/HQZGPwN0TLnzo00qgGR9Vu5awgt7z3AFlDwU2NyILzYpu6wB+n6o 45MjKn62kwW35E3RkSDQlxmw90YCmjnikk/l44T6LVv43j6vJmBXjqhHAvMDRlnGT1EWNwG6C3kZS U0zDq2tc9Z8jpj6Ssod+rY47wpxd0iapnyHU/QuTwe7TRQ1b+VFgI4NZwDO5mXN/2z+oAVVpYCM0s Tt+2g1ot6QPWClTeNgG+vpl4jvBsUdfPix5nr5WGqFvALMGAbGF5DvaqvOvtlu1APISkEtQ2FbPNV mItEkBpc8TMRQf4A2yaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phxfY-004tUx-36; Thu, 30 Mar 2023 19:10:44 +0000 Received: from mailout-taastrup.gigahost.dk ([46.183.139.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phxfU-004tU9-1k; Thu, 30 Mar 2023 19:10:42 +0000 Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id B3439188368C; Thu, 30 Mar 2023 19:10:33 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id ABED62500389; Thu, 30 Mar 2023 19:10:33 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id A2E849B403F4; Thu, 30 Mar 2023 19:10:33 +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 EB58791201E3; Thu, 30 Mar 2023 19:10:32 +0000 (UTC) From: Hans Schultz To: Ido Schimmel Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Vladimir Oltean , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , "maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER" , Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , AngeloGioacchino Del Regno , Claudiu Manoil , Alexandre Belloni , =?utf-8?Q?Cl=C3=A9ment_L=C3=A9ger?= , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Shuah Khan , Christian Marangi , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER" , "moderated list:ETHERNET BRIDGE" , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test In-Reply-To: References: <20230318141010.513424-1-netdev@kapio-technology.com> <20230318141010.513424-7-netdev@kapio-technology.com> <87a5zzh65p.fsf@kapio-technology.com> Date: Thu, 30 Mar 2023 21:07:53 +0200 Message-ID: <874jq22h2u.fsf@kapio-technology.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230330_121040_739875_4E591492 X-CRM114-Status: GOOD ( 24.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 28, 2023 at 19:40, Ido Schimmel wrote: > On Sun, Mar 26, 2023 at 05:41:06PM +0200, Hans Schultz wrote: >> On Mon, Mar 20, 2023 at 10:44, Ido Schimmel wrote: >> >> + $MZ $swp1 -c 1 -p 128 -t udp "sp=54321,dp=12345" \ >> >> + -a $mac -b `mac_get $h2` -A 192.0.2.1 -B 192.0.2.2 -q >> >> + tc_check_packets "dev $swp2 egress" 1 1 >> >> + check_fail $? "Dynamic FDB entry did not age out" >> > >> > Shouldn't this be check_err()? After the FDB entry was aged you want to >> > make sure that packets received via $swp1 with SMAC being $mac are no >> > longer forwarded by the bridge. >> >> I was thinking that check_fail() will pass when tc_check_packets() does >> not see any packets, thus the test passing here when no packets are forwarded? > > What do you mean by "I was *thinking*"? How is it possible that you are > submitting a selftest that you didn't bother running?! > > I see you trimmed my earlier question: "Does this actually work?" > > I tried it and it passed: > > # ./bridge_locked_port.sh > TEST: Locked port ipv4 [ OK ] > TEST: Locked port ipv6 [ OK ] > TEST: Locked port vlan [ OK ] > TEST: Locked port MAB [ OK ] > TEST: Locked port MAB roam [ OK ] > TEST: Locked port MAB configuration [ OK ] > TEST: Locked port MAB FDB flush [ OK ] > > And I couldn't understand how that's even possible. Then I realized that > the entire test is dead code because the patch is missing this > fundamental hunk: > > ``` > diff --git a/tools/testing/selftests/net/forwarding/bridge_locked_port.sh b/tools/testing/selftests/net/forwarding/bridge_locked_port.sh > index dbc7017fd45d..5bf6b2aa1098 100755 > --- a/tools/testing/selftests/net/forwarding/bridge_locked_port.sh > +++ b/tools/testing/selftests/net/forwarding/bridge_locked_port.sh > @@ -9,6 +9,7 @@ ALL_TESTS=" > locked_port_mab_roam > locked_port_mab_config > locked_port_mab_flush > + locked_port_dyn_fdb > " > > NUM_NETIFS=4 > ``` > > Which tells me that you didn't even try running it once. Not true, it reveals that I forgot to put it in the patch, that's all. As I cannot run several of these tests because of memory constraints I link the file to a copy in a rw area where I modify the list and just run one of the subtests at a time. If I try to run the whole it always fails after a couple of sub-tests with an error. It seems to me that these scripts are quite memory consuming as they accumulate memory consuption in relation to what is loaded along the way. A major problem with my system. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel