<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/tools/testing/selftests/net/forwarding/lib.sh, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/net/forwarding/lib.sh?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/tools/testing/selftests/net/forwarding/lib.sh?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-18T23:46:19Z</updated>
<entry>
<title>selftests: mlxsw: Add tc action hw_stats tests</title>
<updated>2020-03-18T23:46:19Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2020-03-18T13:48:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ee4848ac1a8a6c1c167a399efe4114f717b3e921'/>
<id>urn:sha1:ee4848ac1a8a6c1c167a399efe4114f717b3e921</id>
<content type='text'>
Add tests for mlxsw hw_stats types.

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>
<entry>
<title>selftests: forwarding: ETS: Use Qdisc counters</title>
<updated>2020-03-05T22:03:32Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-03-05T07:16:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b9b72999eb86e650489a4321c8e95a4e2e3df20c'/>
<id>urn:sha1:b9b72999eb86e650489a4321c8e95a4e2e3df20c</id>
<content type='text'>
Currently the SW-datapath ETS selftests use "ip link" stats to obtain the
number of packets that went through a given band. mlxsw then uses ethtool
per-priority counters.

Instead, change both to use qdiscs. In SW datapath this is the obvious
choice, and now that mlxsw offloads FIFO, this should work on the offloaded
datapath as well. This has the effect of verifying that the FIFO offload
works.

Signed-off-by: Petr Machata &lt;petrm@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: forwarding: Convert until_counter_is() to take expression</title>
<updated>2020-03-04T01:03:52Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-03-02T17:56:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=844f0556546900a658b241e5aea7b8dc7cb3ff72'/>
<id>urn:sha1:844f0556546900a658b241e5aea7b8dc7cb3ff72</id>
<content type='text'>
until_counter_is() currently takes as an argument a number and the
condition holds when the current counter value is &gt;= that number. Make the
function more generic by taking a partial expression instead of just the
number.

Convert the two existing users.

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: lib: Add tc_rule_handle_stats_get()</title>
<updated>2020-03-04T01:03:52Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-03-02T17:56:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=84ea1f8541721c1852bc95f4d50a603c661eabc6'/>
<id>urn:sha1:84ea1f8541721c1852bc95f4d50a603c661eabc6</id>
<content type='text'>
The function tc_rule_stats_get() fetches a given statistic of a TC rule
given the rule preference. Another common way to reference a rule is using
its handle. Introduce a dual to the aforementioned function that gets a
statistic given rule handle.

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: mlxsw: Use busywait helper in vxlan test</title>
<updated>2020-02-27T19:10:14Z</updated>
<author>
<name>Danielle Ratson</name>
<email>danieller@mellanox.com</email>
</author>
<published>2020-02-27T07:50:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=05ef614c559ee8a496d590f0f468f9f883a06ca9'/>
<id>urn:sha1:05ef614c559ee8a496d590f0f468f9f883a06ca9</id>
<content type='text'>
Vxlan test uses offload indication checks.

Use a busywait helper and wait until the offload indication is set or
fail if it reaches timeout.

Signed-off-by: Danielle Ratson &lt;danieller@mellanox.com&gt;
Reviewed-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
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: mlxsw: Use busywait helper in blackhole routes test</title>
<updated>2020-02-27T19:10:14Z</updated>
<author>
<name>Danielle Ratson</name>
<email>danieller@mellanox.com</email>
</author>
<published>2020-02-27T07:50:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=0c22f993c91a7c215466b9aa833d25df05367dee'/>
<id>urn:sha1:0c22f993c91a7c215466b9aa833d25df05367dee</id>
<content type='text'>
Blackhole routes test uses offload indication checks.

Use busywait helper and wait until the routes offload indication is set or
fail if it reaches timeout.

Signed-off-by: Danielle Ratson &lt;danieller@mellanox.com&gt;
Reviewed-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
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: mlxsw: Add a RED selftest</title>
<updated>2020-02-27T19:10:14Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-02-27T07:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3de611b507628abac081630d8180a9a369c83668'/>
<id>urn:sha1:3de611b507628abac081630d8180a9a369c83668</id>
<content type='text'>
This tests that below the queue minimum length, there is no dropping /
marking, and above max, everything is dropped / marked.

The test is structured as a core file with topology and test code, and
three wrappers: one for RED used as a root Qdisc, and two for
testing (W)RED under PRIO and ETS.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
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: lib.sh: Add start_tcp_traffic</title>
<updated>2020-02-27T19:10:14Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-02-27T07:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4113b04823948e40eda1c54dfadadad4bc01dcdb'/>
<id>urn:sha1:4113b04823948e40eda1c54dfadadad4bc01dcdb</id>
<content type='text'>
Extract a helper __start_traffic() configurable by protocol type. Allow
passing through extra mausezahn arguments. Add a wrapper,
start_tcp_traffic().

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
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: lib: Allow reading TC rule byte counters</title>
<updated>2020-01-25T09:56:31Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-01-24T13:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c143139b7fd36cb66afb4423ac14a1efd8a45609'/>
<id>urn:sha1:c143139b7fd36cb66afb4423ac14a1efd8a45609</id>
<content type='text'>
The function tc_rule_stats_get() fetches a packet counter of a given TC
rule. Extend it to support byte counters as well by adding an optional
argument with selector.

Signed-off-by: Petr Machata &lt;petrm@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: forwarding: lib: Add helpers for busywaiting</title>
<updated>2020-01-25T09:56:31Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2020-01-24T13:23:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4121d9479b24c20ff7d3e7b62a7cf330fae7b2af'/>
<id>urn:sha1:4121d9479b24c20ff7d3e7b62a7cf330fae7b2af</id>
<content type='text'>
The function busywait() is handy as a safety-latched variant of a while
loop. Many selftests deal specifically with counter values, and busywaiting
on them is likely to be rather common (it is not quite common now, but
busywait() has not been around for very long). To facilitate expressing
simply what is tested, introduce two helpers:

- until_counter_is(), which can be used as a predicate passed to
  busywait(), which holds when expression, which is itself passed as an
  argument to until_counter_is(), reaches a desired value.

- busywait_for_counter(), which is useful for waiting until a given counter
  changes "by" (as opposed to "to") a certain amount.

Signed-off-by: Petr Machata &lt;petrm@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>
