<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/drivers, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-03-08T18:14:17Z</updated>
<entry>
<title>selftests: mlxsw: resource_scale: Fix return value</title>
<updated>2022-03-08T18:14:17Z</updated>
<author>
<name>Amit Cohen</name>
</author>
<published>2022-03-02T16:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=283854aae489cc307936277a6b3882f5e82ea2fb'/>
<id>urn:sha1:283854aae489cc307936277a6b3882f5e82ea2fb</id>
<content type='text'>
[ Upstream commit 196f9bc050cbc5085b4cbb61cce2efe380bc66d0 ]

The test runs several test cases and is supposed to return an error in
case at least one of them failed.

Currently, the check of the return value of each test case is in the
wrong place, which can result in the wrong return value. For example:

 # TESTS='tc_police' ./resource_scale.sh
 TEST: 'tc_police' [default] 968                                     [FAIL]
         tc police offload count failed
 Error: mlxsw_spectrum: Failed to allocate policer index.
 We have an error talking to the kernel
 Command failed /tmp/tmp.i7Oc5HwmXY:969
 TEST: 'tc_police' [default] overflow 969                            [ OK ]
 ...
 TEST: 'tc_police' [ipv4_max] overflow 969                           [ OK ]

 $ echo $?
 0

Fix this by moving the check to be done after each test case.

Fixes: 059b18e21c63 ("selftests: mlxsw: Return correct error code in resource scale test")
Signed-off-by: Amit Cohen &lt;amcohen@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: tc_police_scale: Make test more robust</title>
<updated>2022-03-08T18:14:12Z</updated>
<author>
<name>Amit Cohen</name>
</author>
<published>2022-03-02T16:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3638b5f89bc1de038f2f3a86dfed27336fde1ee4'/>
<id>urn:sha1:3638b5f89bc1de038f2f3a86dfed27336fde1ee4</id>
<content type='text'>
commit dc9752075341e7beb653e37c6f4a3723074dc8bc upstream.

The test adds tc filters and checks how many of them were offloaded by
grepping for 'in_hw'.

iproute2 commit f4cd4f127047 ("tc: add skip_hw and skip_sw to control
action offload") added offload indication to tc actions, producing the
following output:

 $ tc filter show dev swp2 ingress
 ...
 filter protocol ipv6 pref 1000 flower chain 0 handle 0x7c0
   eth_type ipv6
   dst_ip 2001:db8:1::7bf
   skip_sw
   in_hw in_hw_count 1
         action order 1:  police 0x7c0 rate 10Mbit burst 100Kb mtu 2Kb action drop overhead 0b
         ref 1 bind 1
         not_in_hw
         used_hw_stats immediate

The current grep expression matches on both 'in_hw' and 'not_in_hw',
resulting in incorrect results.

Fix that by using JSON output instead.

Fixes: 5061e773264b ("selftests: mlxsw: Add scale test for tc-police")
Signed-off-by: Amit Cohen &lt;amcohen@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Add a test case for MAC profiles consolidation</title>
<updated>2021-12-14T12:56:10Z</updated>
<author>
<name>Danielle Ratson</name>
</author>
<published>2021-12-14T10:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20617717cd219d3c1f798cd13dbce1bcd86a6ece'/>
<id>urn:sha1:20617717cd219d3c1f798cd13dbce1bcd86a6ece</id>
<content type='text'>
Add a test case to cover the bug fixed by the previous patch.

Edit the MAC address of one netdev so that it matches the MAC address of
the second netdev. Verify that the two MAC profiles were consolidated by
testing that the MAC profiles occupancy decreased by one.

Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Test offloadability of root TBF</title>
<updated>2021-10-29T02:47:49Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2021-10-27T15:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d5290ea1daeee5da2e46abda730351c2e5b1faa'/>
<id>urn:sha1:3d5290ea1daeee5da2e46abda730351c2e5b1faa</id>
<content type='text'>
TBF can be used as a root qdisc, with the usual ETS/RED/TBF hierarchy below
it. This use should now be offloaded. Add a test that verifies that it is.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Remove deprecated test cases</title>
<updated>2021-10-26T12:35:58Z</updated>
<author>
<name>Danielle Ratson</name>
</author>
<published>2021-10-26T09:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c24dbf3d4f884527bce85417db3065fd5d65dc89'/>
<id>urn:sha1:c24dbf3d4f884527bce85417db3065fd5d65dc89</id>
<content type='text'>
After adding the previous patches, the constraint that all the router
interface MAC addresses have the same prefix is no longer relevant.

Remove the test cases that validated that this constraint is honored.

Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: Add an occupancy test for RIF MAC profiles</title>
<updated>2021-10-26T12:35:58Z</updated>
<author>
<name>Danielle Ratson</name>
</author>
<published>2021-10-26T09:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20d446db6144ff2d60dfebb9db7bea885d7b726b'/>
<id>urn:sha1:20d446db6144ff2d60dfebb9db7bea885d7b726b</id>
<content type='text'>
When all the RIF MAC profiles are in use, test that it is possible to
change the MAC of a netdev (i.e., a RIF) when its MAC profile is not
shared with other RIFs. Test that replacement fails when the MAC profile
is shared.

Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Add forwarding test for RIF MAC profiles</title>
<updated>2021-10-26T12:35:58Z</updated>
<author>
<name>Danielle Ratson</name>
</author>
<published>2021-10-26T09:42:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a10b7bacde60894b999cf9b5fa194ad55f7ded41'/>
<id>urn:sha1:a10b7bacde60894b999cf9b5fa194ad55f7ded41</id>
<content type='text'>
Verify that MAC profile changes are indeed applied and that packets are
forwarded with the correct source MAC.

Output example:

$ ./rif_mac_profiles.sh
TEST: h1-&gt;h2: new mac profile                                       [ OK ]
TEST: h2-&gt;h1: new mac profile                                       [ OK ]
TEST: h1-&gt;h2: edit mac profile                                      [ OK ]
TEST: h2-&gt;h1: edit mac profile                                      [ OK ]

Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Add a scale test for RIF MAC profiles</title>
<updated>2021-10-26T12:35:58Z</updated>
<author>
<name>Danielle Ratson</name>
</author>
<published>2021-10-26T09:42:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=152f98e7c5cb472e37d44ff8bb07029e77e9508d'/>
<id>urn:sha1:152f98e7c5cb472e37d44ff8bb07029e77e9508d</id>
<content type='text'>
Query the maximum number of supported RIF MAC profiles using
devlink-resource and verify that all available MAC profiles can be utilized
and that an error is generated when user space tries to exceed this number.

Output example in Spectrum-2:

$ TESTS='rif_mac_profile' ./resource_scale.sh
TEST: 'rif_mac_profile' 4                                           [ OK ]
TEST: 'rif_mac_profile' overflow 5                                  [ OK ]

Signed-off-by: Danielle Ratson &lt;danieller@nvidia.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Reduce test run time</title>
<updated>2021-10-25T13:10:11Z</updated>
<author>
<name>Ido Schimmel</name>
</author>
<published>2021-10-24T07:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e860419684b547dd4daa8143ad70a97955571482'/>
<id>urn:sha1:e860419684b547dd4daa8143ad70a97955571482</id>
<content type='text'>
Instead of iterating over all the available trap policers, only perform
the tests with three policers: The first, the last and the one in the
middle of the range. On a Spectrum-3 system, this reduces the run time
from almost an hour to a few minutes.

Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Use permanent neighbours instead of reachable ones</title>
<updated>2021-10-25T13:10:11Z</updated>
<author>
<name>Ido Schimmel</name>
</author>
<published>2021-10-24T07:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=535ac9a5fba51acce1cbde2257a0ef8f35d4ac70'/>
<id>urn:sha1:535ac9a5fba51acce1cbde2257a0ef8f35d4ac70</id>
<content type='text'>
The nexthop objects tests configure dummy reachable neighbours so that
the nexthops will have a MAC address and be programmed to the device.

Since these are dummy reachable neighbours, they can be transitioned by
the kernel to a failed state if they are around for too long. This can
happen, for example, if the "TIMEOUT" variable is configured with a too
high value.

Make the tests more robust by configuring the neighbours as permanent,
so that the tests do not depend on the configured timeout value.

Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
