<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/net/forwarding/tc_common.sh, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2021-10-08T15:40:58Z</updated>
<entry>
<title>testing: selftests: tc_common: Add tc_check_at_least_x_packets()</title>
<updated>2021-10-08T15:40:58Z</updated>
<author>
<name>Amit Cohen</name>
<email>amcohen@nvidia.com</email>
</author>
<published>2021-10-08T13:12:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c08d227290f618ada4028f0303743263cc026dd9'/>
<id>urn:sha1:c08d227290f618ada4028f0303743263cc026dd9</id>
<content type='text'>
Add function that checks that at least X packets hit the tc rule.
There are cases that it is not possible to catch only the interesting
packets, so then, it is possible to send many packets and verify that at
least this amount of packets hit the rule.

This function will be used in the next patch for general tc rule that
can be used to test both software and hardware.

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: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: tc_common: Convert to use busywait</title>
<updated>2020-03-04T01:03:52Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-03-02T17:56:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=47b0e096a938b020742b4f12afdc17aff21af6ca'/>
<id>urn:sha1:47b0e096a938b020742b4f12afdc17aff21af6ca</id>
<content type='text'>
A function busywait() was recently added based on the logic in
__tc_check_packets(). Convert the code in tc_common to use the new
function.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Reviewed-by: Amit Cohen &lt;amitc@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: fix race between packet receive and tc check</title>
<updated>2019-11-30T20:23:27Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-11-28T12:38:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=408469d31e9106878d2b3e428dcca9984664dfc9'/>
<id>urn:sha1:408469d31e9106878d2b3e428dcca9984664dfc9</id>
<content type='text'>
It is possible that tc stats get checked before the packet we check for
actually arrived into the interface and accounted for.
Fix it by checking for the expected result in a loop until
timeout is reached (by default 1 second).

Fixes: 07e5c75184a1 ("selftests: forwarding: Introduce tc flower matching tests")
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: tc_common: Add hitting check</title>
<updated>2019-11-08T03:51:40Z</updated>
<author>
<name>Amit Cohen</name>
<email>amitc@mellanox.com</email>
</author>
<published>2019-11-07T16:42:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f10caf0278d150beacc97090c911ee7cb43bfba3'/>
<id>urn:sha1:f10caf0278d150beacc97090c911ee7cb43bfba3</id>
<content type='text'>
Add an option to check that packets hit the tc filter without providing
the exact number of packets that should hit it.

It is useful while sending many packets in background and checking that
at least one of them hit the tc filter.

Signed-off-by: Amit Cohen &lt;amitc@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: net: push jq workaround into separate helper</title>
<updated>2019-08-15T19:01:21Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-08-15T13:42:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d87e5edb4cd7c954b71cfcb9fbfce65eac76e141'/>
<id>urn:sha1:d87e5edb4cd7c954b71cfcb9fbfce65eac76e141</id>
<content type='text'>
Push the jq return value workaround code into a separate helper so it
could be used by the rest of the code.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: Only check tc version for tc tests</title>
<updated>2018-03-02T02:19:02Z</updated>
<author>
<name>David Ahern</name>
<email>dsahern@gmail.com</email>
</author>
<published>2018-03-01T21:49:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=198979be6c16aa62025d5a47680f2c7849b7e64c'/>
<id>urn:sha1:198979be6c16aa62025d5a47680f2c7849b7e64c</id>
<content type='text'>
Capabilities of tc command are irrelevant for router tests:
    $ ./router.sh
    SKIP: iproute2 too old, missing shared block support

Add a CHECK_TC flag and only check tc capabilities if set. Add flag to
tc_common.sh and have it sourced before lib.sh

Also, if the command lacks some feature the test should exit non-0.

Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: Introduce tc flower matching tests</title>
<updated>2018-02-28T17:25:48Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2018-02-28T10:25:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=07e5c75184a11c46eddb08f2435ba4f3e7152e62'/>
<id>urn:sha1:07e5c75184a11c46eddb08f2435ba4f3e7152e62</id>
<content type='text'>
Add first part of flower tests. This patch only contains dst/src ip/mac
matching.

Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
