Hans Schultz
2023-Mar-31 08:06 UTC
[Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test
On Thu, Mar 30, 2023 at 22:27, Vladimir Oltean <olteanv at gmail.com> wrote:> On Thu, Mar 30, 2023 at 09:07:53PM +0200, Hans Schultz wrote: >> 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. > > I'm sorry for perhaps asking something entirely obvious, but have you tried: > > kernel-dir $ rsync -avr tools/testing/selftests/ root@$board:selftests/ > board $ cd selftests/drivers/net/dsa/ > board $ ./bridge_locked_port.sh lan0 lan1 lan2 lan3 > > ? > > This is how I always run them, and it worked fine with both Debian > (where it's easy to add missing packages to the rootfs) or with a more > embedded-oriented Buildroot.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. 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.
Vladimir Oltean
2023-Mar-31 09:37 UTC
[Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test
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 at mail.gmail.com/ https://lore.kernel.org/netdev/20220707135532.1783925-1-martin.blumenstingl at 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.
Maybe Matching Threads
- [Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test
- [Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test
- [Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test
- [Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test
- [Bridge] [PATCH v2 net-next 6/6] selftests: forwarding: add dynamic FDB test