<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/drivers, branch v5.17</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=v5.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-03-03T16:14:01Z</updated>
<entry>
<title>selftests: mlxsw: resource_scale: Fix return value</title>
<updated>2022-03-03T16:14:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2022-03-02T16:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=196f9bc050cbc5085b4cbb61cce2efe380bc66d0'/>
<id>urn:sha1:196f9bc050cbc5085b4cbb61cce2efe380bc66d0</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>selftests: mlxsw: tc_police_scale: Make test more robust</title>
<updated>2022-03-03T16:14:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2022-03-02T16:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc9752075341e7beb653e37c6f4a3723074dc8bc'/>
<id>urn:sha1:dc9752075341e7beb653e37c6f4a3723074dc8bc</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>selftests: mlxsw: devlink_trap_tunnel_vxlan: Fix 'decap_error' case</title>
<updated>2021-12-23T11:24:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=810ef9552dece4e9bb3ef37d008dc2cf4b317dc6'/>
<id>urn:sha1:810ef9552dece4e9bb3ef37d008dc2cf4b317dc6</id>
<content type='text'>
Change the case that sends packets with "too short inner packet" to
include part of ethernet header, to make the trap to be triggered due to
the correct reason.

According to ASIC arch, the trap is triggered if overlay packet length is
less than 18B, and the minimum inner packet should include source MAC and
destination MAC.

Till now the case passed because one of the reserved bits in VxLAN
header was used. This issue was found while adding an equivalent test
for IPv6.

Signed-off-by: Amit Cohen &lt;amcohen@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: Add test for VxLAN related traps for IPv6</title>
<updated>2021-12-23T11:24:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c777d726267c0a5ca9216a5f17ed12d67bc97c99'/>
<id>urn:sha1:c777d726267c0a5ca9216a5f17ed12d67bc97c99</id>
<content type='text'>
The test configures VxLAN with IPv6 underlay and verifies that the
expected traps are triggered under the right conditions.

The test is similar to the existing IPv4 test.

Signed-off-by: Amit Cohen &lt;amcohen@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: spectrum-2: Add a test for VxLAN flooding with IPv6</title>
<updated>2021-12-23T11:24:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:30:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d01724dd2a66087ac6b3c4b45e25d475be7dd2f4'/>
<id>urn:sha1:d01724dd2a66087ac6b3c4b45e25d475be7dd2f4</id>
<content type='text'>
The device stores flood records in a singly linked list where each
record stores up to X IP addresses of remote VTEPs.

The number of records is changed according to ASIC type and address
family.

Add a test which is similar to the existing IPv4 test to check IPv6.
The test is dedicated for Spectrum-2 and above, which support up to four
IPv6 addresses in one record.

The test verifies that packets are correctly flooded in various cases such
as deletion of a record in the middle of the list.

Signed-off-by: Amit Cohen &lt;amcohen@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: spectrum: Add a test for VxLAN flooding with IPv6</title>
<updated>2021-12-23T11:24:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ae23eddfa3e5c1d1892c19a50cfe52b4af300cf'/>
<id>urn:sha1:7ae23eddfa3e5c1d1892c19a50cfe52b4af300cf</id>
<content type='text'>
The device stores flood records in a singly linked list where each
record stores up to X IP addresses of remote VTEPs.

The number of records is changed according to ASIC type and address
family.

Add a test which is similar to the existing IPv4 test to check IPv6.
The test is dedicated for Spectrum-1 switches, which support up to five
IPv6 addresses in one record.

The test verifies that packets are correctly flooded in various cases such
as deletion of a record in the middle of the list.

Signed-off-by: Amit Cohen &lt;amcohen@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: Add VxLAN FDB veto test for IPv6</title>
<updated>2021-12-23T11:24:01Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:29:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c7b183dac8917f6329cc809ac61cdf9d3ce9f3f'/>
<id>urn:sha1:1c7b183dac8917f6329cc809ac61cdf9d3ce9f3f</id>
<content type='text'>
Add test to verify FDB vetos of VxLAN with IPv6 underlay.
Use the existing test which checks IPv4.

Signed-off-by: Amit Cohen &lt;amcohen@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: vxlan_fdb_veto: Make the test more flexible for future use</title>
<updated>2021-12-23T11:24:00Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=696285305b32f4fc1ddfb2d158ef4bbb6085ab92'/>
<id>urn:sha1:696285305b32f4fc1ddfb2d158ef4bbb6085ab92</id>
<content type='text'>
vxlan_fdb_veto.sh cases are dedicated to test VxLAN with IPv4 underlay.
The main changes to test IPv6 underlay are IP addresses and some flags.

Add variables to define all the values which supposed to be different
for IPv6 testing, set them to use the existing values by default.

The next patch will define the new added variables in a separated file,
so the same tests can be used for IPv6 also.

Signed-off-by: Amit Cohen &lt;amcohen@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: Add VxLAN configuration test for IPv6</title>
<updated>2021-12-23T11:24:00Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:29:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21d4282dc1b81249184525da1acdb308288a952c'/>
<id>urn:sha1:21d4282dc1b81249184525da1acdb308288a952c</id>
<content type='text'>
Add test to verify configuration of VxLAN with IPv6 underlay.
Use the existing test which checks IPv4.

Add separated test cases for learning which is not supported for IPv6
and for UDP checksum flags which are different from IPv4 flags.

Signed-off-by: Amit Cohen &lt;amcohen@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: vxlan: Make the test more flexible for future use</title>
<updated>2021-12-23T11:24:00Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-12-23T07:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e059d64bee4a71064423ed34e04868cff478678'/>
<id>urn:sha1:8e059d64bee4a71064423ed34e04868cff478678</id>
<content type='text'>
vxlan.sh cases are dedicated to test VxLAN with IPv4 underlay.
The main changes to test IPv6 underlay are IP addresses and some flags.

Add variables to define all the values which supposed to be different
for IPv6 testing, set them to use the existing values by default.

The next patch will define the new added variables in a separated file,
so the same tests can be used for IPv6 also.

Rename some functions to include "ipv4", so the next patch will add
equivalent functions for IPv6.

Signed-off-by: Amit Cohen &lt;amcohen@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>
