Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp810872rwl; Fri, 31 Mar 2023 02:45:01 -0700 (PDT) X-Google-Smtp-Source: AKy350aUnrtlkl6ehuF7uuRoaAMQj9vcGMnaOG8Ti0M5/aadlHS2Qdy4VgxeGecLrxvcE0s89Yb5 X-Received: by 2002:a05:6402:524e:b0:4fd:298d:4f26 with SMTP id t14-20020a056402524e00b004fd298d4f26mr4863193edd.3.1680255901040; Fri, 31 Mar 2023 02:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680255901; cv=none; d=google.com; s=arc-20160816; b=rDHp4PVhU8OO8gCag349oa7Wu0MDhnEqOrKH8TAdvLv+oS1cIGwcqVp/m+Ig3GKVSc T56IQeHFLaVLthnrK9VPgIET6B+cn1xp88GCznZjdZt4hNpuNbPEOPwR7X70PecS0y4P 6D3w0vI8BNHduNO76FOObZewGZIanVpjX7wdo4ZlU/BtloVdIaTIMoyFpw7B3lnqcmcL 8kst4T3c7JgXyEXOt6Wypv/rDQGNUAsEdbuCKM416DhSiwDgpX0cnXjmErzzEc4yKE1o Ee3B2YmxOLRh0R4si7HLUsTtkXIHjtz+hWRZ5vKBFkeDVBaGA/vBSeZJHisW6TNwIK0P QhJQ== 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=2I7yU40CH1KTIPKs6kPsl2SefiwR2YueS62dP0NZHu0=; b=kBHzNF4NHw4/BbdCbHTA82nOKnQho4VTUQli1qxZyqWRkHThbpOoYgld59oOuSkXy3 R2bPKLIttcaTR0hUuKvr+1Tjhkzp1fX98IGRS4741ePz9KHomwh9CeCT4bfCyliPTha7 O4nnawpiXka/m3pbGbjJQpKf5zbf/uCnTJHIBHpcAS9tWvj0iV9UUC9nEGYSDvirHHLs 9sn8iuvAWytd1dUsbCY+62PWcYS+n4JnsL8Iqgu9QneEtXVdxq22tgZ1uA+MNuO9Tnkj lz5kH75mwLjjXJi8VdM+jk18p/fl0n9/LQ+3BJhkx4P8Im1Dm4ce9JLhLO0GIcDVUEOB 3/Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CULtuAu+; 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 p16-20020a056402075000b004ad0287dbafsi1056404edy.203.2023.03.31.02.44.33; Fri, 31 Mar 2023 02:45:01 -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=CULtuAu+; 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 S232383AbjCaJiO (ORCPT + 99 others); Fri, 31 Mar 2023 05:38:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232330AbjCaJiA (ORCPT ); Fri, 31 Mar 2023 05:38:00 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D50E93C30; Fri, 31 Mar 2023 02:37:37 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id h8so87266080ede.8; Fri, 31 Mar 2023 02:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680255456; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2I7yU40CH1KTIPKs6kPsl2SefiwR2YueS62dP0NZHu0=; b=CULtuAu+grWGSjin+B2q5K4vYLYkcVUEPT39QZYv//yLch8kj4X27vymmyL6jBA+6i ACX6DSEhIpF/wfIzCNgePEz4Vh8s7ay58GscTeT85T1s0GBwPwzwrUMGQt5B18kY6yGt 6pnNAfBEPK90KIPsAWjhQtATM+vY7j2qnuCzy28AkPwgdA0wZiMdDFqUAjg5x0HOdywP RCbkrkVCOApLgALXeDU7BFWqM8Jw0onrurgD9v1FxXo9Pjel8PvrWFWJbC8sy/v87HQY 6igVRZ6GHH31atrxF93yu5HzZFuCVxemH5qtqiMhRdt4LWTplUbroNn5PAMAJQxsMd+q tVxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680255456; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2I7yU40CH1KTIPKs6kPsl2SefiwR2YueS62dP0NZHu0=; b=ncqVqTyheWW5KV9vupPndE0HRMzZ7snz/4LbcaP9orAZtEbAwpIlbmOGd8bWQ6jIQb 7cdDlrJHPSNBF8xeac//0w2/bpFbQHJ5eYr5TH+/5g9nGz5tho7+1hrjV3bjgDtmtauG SMnAzL3a/K+JlQFz+j49xFqMXDfEXdW1pXWg45m63tNnM2vVNgw9AwwSq3zcrxKLIhdw pCdKEhfFn/c+iqqjvVgcKQnIKbjahBoEWzfcTCd/Iq7Pe/VNz36Cr9twyePKjOdBFhYg IcScJWvnwrukQqr/UAZMQmfr9r8M1nNjP4rIpBM8olnmo7bIaKm6xZYWKP7B4sfm9g9r eLrg== X-Gm-Message-State: AAQBX9dleib3Bo+VfxfMG8ImV39GZ1L2hUS1UqIF+fJJ6zGhYSPPvCr+ EaIP36aR3bxcKudKx+oYWSw= X-Received: by 2002:a17:906:f190:b0:931:a321:7640 with SMTP id gs16-20020a170906f19000b00931a3217640mr29388052ejb.74.1680255455987; Fri, 31 Mar 2023 02:37:35 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id gx20-20020a1709068a5400b00931faf03db0sm790309ejc.27.2023.03.31.02.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 02:37:35 -0700 (PDT) Date: Fri, 31 Mar 2023 12:37:32 +0300 From: Vladimir Oltean To: Hans Schultz Cc: Ido Schimmel , davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , 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?B?Q2zDqW1lbnQgTMOpZ2Vy?= , 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 Message-ID: <20230331093732.s6loozkdhehewlm4@skbuf> References: <20230318141010.513424-1-netdev@kapio-technology.com> <20230318141010.513424-7-netdev@kapio-technology.com> <87a5zzh65p.fsf@kapio-technology.com> <874jq22h2u.fsf@kapio-technology.com> <20230330192714.oqosvifrftirshej@skbuf> <871ql5mjjp.fsf@kapio-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871ql5mjjp.fsf@kapio-technology.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Fri, Mar 31, 2023 at 10:06:34AM +0200, Hans Schultz wrote: > The memory problems are of course on the embedded target. In that case I > think it would be a very good idea to do something to design the system > better, so that it frees memory between the subtests. People like Martin Blumenstingl have managed to deploy and run the networking kselftests on OpenWRT, which typically runs on very resource-constrained embedded devices. https://lore.kernel.org/netdev/CAFBinCDX5XRyMyOd-+c_Zkn6dawtBpQ9DaPkA4FDC5agL-t8CA@mail.gmail.com/ https://lore.kernel.org/netdev/20220707135532.1783925-1-martin.blumenstingl@googlemail.com/ Considering that, you'll have to come with a much more concrete description of why the system should be "designed better" and "free memory between subtests" (what memory?!) before you could run it on your target system. Either that, or at least take into serious consideration the fact that you may be hung up on doing something which isn't necessary for the end goal. I simply have no clue what you're talking about. It's as if we're talking about completely different things. > If all tests are always run on the bridge only, I think they don't make > much sense as these patchsets are directed towards switchcores. Is this supposed to mean something, or is it just a random thought you had, that you believed it would be good to share with us? The tools/testing/selftests/net/forwarding/lib.sh central framework has the NETIF_TYPE and NETIF_CREATE variables, which indicate that by default, veth interfaces are created. When running a bridge selftest with veth as bridge ports, indeed software bridging should take place, and those selftests should work fine. In Linux, the software behavior represents a model for the offload behavior, since offloads are 100% transparent to the user most of the time. Below in lib.sh, there is a line which sources "$relative_path/forwarding.config", a file which can contain customizations of the default variables used by the framework. Even though it isn't strictly necessary to put the customized bash variables in a forwarding.config file, it is more convenient to do this than to specify them as environment variables. If you "cd tools/testing/selftests/drivers/net/dsa/", you will find precisely such a forwarding.config file there, which contains the line "NETIF_CREATE=no", which means that when you run the symlinked sub-group of forwarding tests relevant to DSA from this folder, the expectation is that the bridge ports are not veth interfaces created for the test, but rather, physical ports. So, by running the command I posted in the earlier email, you actually run it on the physical DSA user port interfaces, and it should pass there too. This is based on the equivalency principle between the software and the hardware data paths that I was talking about. If you're actively and repeatedly making an effort to work with your eyes closed, and then build strawmen around the fact that you don't see, then you're not going to get very friendly reactions from people, me included, who explain things to you that pertain to your due diligence. This is because these people know the things that they're explaining to you out of their own due diligence, and, as a result, are not easily fooled by your childish excuses.