<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/drivers/net/mlxsw, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2026-02-13T02:36:08Z</updated>
<entry>
<title>selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2</title>
<updated>2026-02-13T02:36:08Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@nvidia.com</email>
</author>
<published>2026-02-09T13:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2646773a005b59fd1dc7ff3ba15df84889ca5d2'/>
<id>urn:sha1:a2646773a005b59fd1dc7ff3ba15df84889ca5d2</id>
<content type='text'>
As explained in [1], iproute2 started rejecting tc-police burst sizes
that result in an overflow. This can happen when the burst size is high
enough and the rate is low enough.

A couple of test cases specify such configurations, resulting in
iproute2 errors and test failure.

Fix by reducing the burst size so that the test will pass with both new
and old iproute2 versions.

[1] https://lore.kernel.org/netdev/20250916215731.3431465-1-jay.vosburgh@canonical.com/

Fixes: cb12d1763267 ("selftests: mlxsw: tc_restrictions: Test tc-police restrictions")
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/88b00c6e85188aa6a065dc240206119b328c46e1.1770643998.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: lib: Add an autodefer variant of simple_if_init()</title>
<updated>2025-09-27T00:48:40Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2025-09-25T17:31:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f53748d56d1092657d30a094df92b11a24eadd12'/>
<id>urn:sha1:f53748d56d1092657d30a094df92b11a24eadd12</id>
<content type='text'>
Most forwarding tests invoke simple_if_init() to set up a VRF-based "host"
and simple_if_fini() to tear it down again. Add a helper,
adf_simple_if_init(), which is like simple_if_fini(), but takes care of
scheduling the cleanup automatically.

Convert the tests that currently use defer to schedule the cleanup.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/6b9ee1a7946a36fd32a47fdb1aa9325198ffc695.1758821127.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: lib: Add an autodefer variant of vrf_prepare()</title>
<updated>2025-09-27T00:48:40Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2025-09-25T17:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02aabe00b2e1cc61e7a60616d6044592f12a748c'/>
<id>urn:sha1:02aabe00b2e1cc61e7a60616d6044592f12a748c</id>
<content type='text'>
Most forwarding tests invoke vrf_prepare() to set up VRF forwarding and
vrf_cleanup() to restore the original configuration. Add a helper,
adf_vrf_prepare(), which is like vrf_prepare(), but takes care of
scheduling the cleanup automatically.

Convert a number of tests that currently use defer to schedule the cleanup.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/2f2000e54ae700d560a8d6128322dade3bd2207e.1758821127.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: lib: Split setup_wait()</title>
<updated>2025-06-27T00:53:07Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2025-06-25T10:41:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7863babce0a7aacb252e50d75b192476aa81ea1'/>
<id>urn:sha1:b7863babce0a7aacb252e50d75b192476aa81ea1</id>
<content type='text'>
setup_wait() takes an optional argument and then is called from the top
level of the test script. That confuses shellcheck, which thinks that maybe
the intention is to pass $1 of the script to the function, which is never
the case. To avoid having to annotate every single new test with a SC
disable, split the function in two: one that takes a mandatory argument,
and one that takes no argument at all.

Convert the two existing users of that optional argument, both in Spectrum
resource selftest, to use the new form. Clean up vxlan_bridge_1q_mc_ul.sh
to not pass a now-unused argument.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Link: https://patch.msgid.link/8e13123236fe3912ae29bc04a1528bdd8551da1f.1750847794.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/net/forwarding: teamd command not found</title>
<updated>2025-01-15T22:14:40Z</updated>
<author>
<name>Alessandro Zanni</name>
<email>alessandro.zanni87@gmail.com</email>
</author>
<published>2025-01-14T00:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a649f39dab77b494b2b2dd38153d0ba7b037c4b'/>
<id>urn:sha1:7a649f39dab77b494b2b2dd38153d0ba7b037c4b</id>
<content type='text'>
Running "make kselftest TARGETS=net/forwarding" results in
multiple ccurrences of the same error:
- ./lib.sh: line 787: teamd: command not found

This patch adds the variable $REQUIRE_TEAMD in every test that uses the
command teamd and checks the $REQUIRE_TEAMD variable in the file "lib.sh"
to skip the test if the command is not installed.

Signed-off-by: Alessandro Zanni &lt;alessandro.zanni87@gmail.com&gt;
Link: https://patch.msgid.link/20250114003323.97207-1-alessandro.zanni87@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: sharedbuffer: Ensure no extra packets are counted</title>
<updated>2024-12-07T01:37:37Z</updated>
<author>
<name>Danielle Ratson</name>
<email>danieller@nvidia.com</email>
</author>
<published>2024-12-05T16:36:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f2c7ab15fd806043db1a7d54b5ec36be0bd93b1'/>
<id>urn:sha1:5f2c7ab15fd806043db1a7d54b5ec36be0bd93b1</id>
<content type='text'>
The test assumes that the packet it is sending is the only packet being
passed to the device.

However, it is not the case and so other packets are filling the buffers
as well. Therefore, the test sometimes fails because it is reading a
maximum occupancy that is larger than expected.

Add egress filters on $h1 and $h2 that will guarantee the above.

Fixes: a865ad999603 ("selftests: mlxsw: Add shared buffer traffic test")
Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Link: https://patch.msgid.link/64c28bc9b1cc1d78c4a73feda7cedbe9526ccf8b.1733414773.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: sharedbuffer: Remove duplicate test cases</title>
<updated>2024-12-07T01:37:37Z</updated>
<author>
<name>Danielle Ratson</name>
<email>danieller@nvidia.com</email>
</author>
<published>2024-12-05T16:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c46ad4d1bb2e8ec2265296e53765190f6e32f33'/>
<id>urn:sha1:6c46ad4d1bb2e8ec2265296e53765190f6e32f33</id>
<content type='text'>
On both port_tc_ip_test() and port_tc_arp_test(), the max occupancy is
checked on $h2 twice, when only the error message is different and does not
match the check itself.

Remove the two duplicated test cases from the test.

Fixes: a865ad999603 ("selftests: mlxsw: Add shared buffer traffic test")
Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Link: https://patch.msgid.link/d9eb26f6fc16a06a30b5c2c16ad80caf502bc561.1733414773.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: sharedbuffer: Remove h1 ingress test case</title>
<updated>2024-12-07T01:37:37Z</updated>
<author>
<name>Danielle Ratson</name>
<email>danieller@nvidia.com</email>
</author>
<published>2024-12-05T16:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf3515c556907b4da290967a2a6cbbd9ee0ee723'/>
<id>urn:sha1:cf3515c556907b4da290967a2a6cbbd9ee0ee723</id>
<content type='text'>
The test is sending only one packet generated with mausezahn from $h1 to
$h2. However, for some reason, it is testing for non-zero maximum occupancy
in both the ingress pool of $h1 and $h2. The former only passes when $h2
happens to send a packet.

Avoid intermittent failures by removing unintentional test case
regarding the ingress pool of $h1.

Fixes: a865ad999603 ("selftests: mlxsw: Add shared buffer traffic test")
Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Link: https://patch.msgid.link/5b7344608d5e06f38209e48d8af8c92fa11b6742.1733414773.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: net: lib: Add kill_process</title>
<updated>2024-11-16T00:39:19Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2024-11-14T14:09:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46f6569cf0754e27816403c3701c7070ff281ad0'/>
<id>urn:sha1:46f6569cf0754e27816403c3701c7070ff281ad0</id>
<content type='text'>
A number of selftests run processes in the background and need to kill them
afterwards. Instead for everyone to open-code the kill / wait / redirect
mantra, add a helper in net/lib.sh. Convert existing open-code sites.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Reviewed-by: Amit Cohen &lt;amcohen@nvidia.com&gt;
Link: https://patch.msgid.link/a9db102067d741c118f0bd93b10c75e2a34665ea.1731589511.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: devlink_trap_police: Use defer for test cleanup</title>
<updated>2024-10-22T11:33:48Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2024-10-17T09:45:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cebd281f3c753dcbd48b455bdbc6549889196aa0'/>
<id>urn:sha1:cebd281f3c753dcbd48b455bdbc6549889196aa0</id>
<content type='text'>
Use the defer framework to schedule cleanups as soon as the command is
executed.

Note that the start_traffic commands in __burst_test() are each sending a
fixed number of packets (note the -c flag) and then ending. They therefore
do not need a matching stop_traffic.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
</feed>
