Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp72573rwl; Thu, 30 Mar 2023 12:19:37 -0700 (PDT) X-Google-Smtp-Source: AKy350adZJrV2crucGPAPPyfEQTfSVKBGS8mZz8LDJ0S7yMKj+3RJ+D6thwXtIhAN6k6JWEsoT9U X-Received: by 2002:a05:6a21:32a2:b0:e3:6fdb:f6c6 with SMTP id yt34-20020a056a2132a200b000e36fdbf6c6mr3316302pzb.6.1680203977498; Thu, 30 Mar 2023 12:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680203977; cv=none; d=google.com; s=arc-20160816; b=wmV7Mv+pK8DjMqueewNH5miJmVLPylYNmXrhlIp9DjlriDMYT2Q/uOvzMbo1vBXx9w sVh/spywqKU5F/MBib3z+YvWMrJjoWQUw7HdiIHHQ5v2R8Rl/yjA5+GxwvsjWqlAaKyI lkDBmOQQIYswu29GWpaYAANg3WYqAA2afvDb/hB1Gw/MyVSTgsbtiaqn/OPQ8wGgtGgM 0lWLjr9YiNRRPU1L9OiNB7QGCkpZxPhfg0oSDkiJtELcy7sgzmEEYXp13iTZkqsnpDZn oIGdUa/+YSZgGqSg1S/UUVbFqIuW+CMcfN20Pto56gRQZFLrNYsuCUDcVxjr9XihHcFM fgEQ== 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=4ZUEVJzKV5CCUAuAWP8jjoDdP5eD9FrccAF6rSagut8=; b=Oe18omCsozZ4YAxvyJWJi/wAV4JgfEx3zP82n391RDPcAsO/O5AQ6yJGIPBDmCnPE3 waGrClvMQirxlWS/bXcekqej88KgzjWKBlLsaNch8PuJsCAuXyeYibMa65DH8mTwF5wu Z6iWPUTAtM8Pc0ECvfoWhaJGW83vffol9kad7BkJGNLtU7C6pb8GPDo4tuQ5AAzBhe74 3ZTaTwlj2IU+Ob6PtdzuMMRKJRsbaQys9DYJYIsevB0Ycihn/Z/JV4noyb9o3KbvNEcz jab1JaK+5ZcNdQZYxYgm2f8dzj/lCkUTvWcv8qKmjg+zq6QZ6fiuxQLwW+s70pr87VdI gAaA== 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 f31-20020a63101f000000b00502fdce9dcasi378659pgl.114.2023.03.30.12.19.25; Thu, 30 Mar 2023 12:19:37 -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 S231966AbjC3TKt (ORCPT + 99 others); Thu, 30 Mar 2023 15:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjC3TKs (ORCPT ); Thu, 30 Mar 2023 15:10:48 -0400 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C291C174; Thu, 30 Mar 2023 12:10:45 -0700 (PDT) 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 Content-Type: text/plain X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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, 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.