<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/net/forwarding/lib.sh, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-10-11T05:22:07Z</updated>
<entry>
<title>selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too</title>
<updated>2018-10-11T05:22:07Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-10-08T18:50:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=372809055f6c830ff978564e09f58bcb9e9b937c'/>
<id>urn:sha1:372809055f6c830ff978564e09f58bcb9e9b937c</id>
<content type='text'>
Immediately after mlxsw module is probed and lldpad started, added APP
entries are briefly in "unknown" state before becoming "pending". That's
the state that lldpad_app_wait_set() typically sees, and since there are
no pending entries at that time, it bails out. However the entries have
not been pushed to the kernel yet at that point, and thus the test case
fails.

Fix by waiting for both unknown and pending entries to disappear before
proceeding.

Fixes: d159261f3662 ("selftests: mlxsw: Add test for trust-DSCP")
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 mtu_set(), mtu_restore()</title>
<updated>2018-09-20T14:46:02Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-09-20T06:21:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a381ed12ea33888a08f0e3e5ba22a255fa5f7257'/>
<id>urn:sha1:a381ed12ea33888a08f0e3e5ba22a255fa5f7257</id>
<content type='text'>
Some selftests need to tweak MTU of an interface, and naturally should
at teardown restore the MTU back to the original value. Add two
functions to facilitate this MTU handling: mtu_set() to change MTU
value, and mtu_reset() to change it back to what it was before.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Reviewed-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: lib: Add ethtool_stats_get()</title>
<updated>2018-09-20T14:46:01Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-09-20T06:21:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3136a3698804f55a26f68e8c897d7ccf254923ad'/>
<id>urn:sha1:3136a3698804f55a26f68e8c897d7ccf254923ad</id>
<content type='text'>
Add a new service function to obtain ethtool counters.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Reviewed-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: Move DSCP capture to lib.sh</title>
<updated>2018-08-01T16:52:30Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-07-31T22:39:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf60869814bcdfbeec02e92ce9e6b38562707edd'/>
<id>urn:sha1:cf60869814bcdfbeec02e92ce9e6b38562707edd</id>
<content type='text'>
dscp_capture_install() and dscp_capture_uninstall() are going to be
useful for a test added by a following patch, move them therefore to
lib.sh together with related helpers.

While doing so, change the rule preference from mere DSCP value to
DSCP+100 in order to support adding captures of packets with DSCP of 0.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Reviewed-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: Move lldpad waiting to lib.sh</title>
<updated>2018-08-01T16:52:30Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-07-31T22:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=989133bf7ff3fe6ebcb9c1e7b5e13bebac175d35'/>
<id>urn:sha1:989133bf7ff3fe6ebcb9c1e7b5e13bebac175d35</id>
<content type='text'>
The function lldpad_wait() will be useful for a test added by a
following patch. Likewise would the "sleep 5" with its extensive
comment.

Therefore move lldpad_wait() to lib.sh in order to allow reuse. Rename
it to lldpad_app_wait_set() to recognize that what this is intended to
wait on are the pending APP sets.

For the sleeping, add a function lldpad_app_wait_del(). That will serve
to hold the related explanatory comment (which edit for clarity), and as
a token in the caller to identify the sites where this sort of waiting
takes place. That will serve when/if a better way to handle this
business is found.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Reviewed-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: Introduce $ARPING</title>
<updated>2018-07-30T16:47:21Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-07-30T14:39:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca70a5623823841c179cf792b549d63b5fbe32ab'/>
<id>urn:sha1:ca70a5623823841c179cf792b549d63b5fbe32ab</id>
<content type='text'>
Instead of relying on "arping" being installed everywhere under that
name, introduce a variable $ARPING like the other tools do.

Convert an existing test, mirror_gre_vlan_bridge_1q.sh to
require_command $ARPING and then invoke arping through the variable.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: lib: Support team devices</title>
<updated>2018-07-30T16:47:21Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-07-30T14:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d9e6bde3df4ec6af0cc7dac328f8d8555aa36f9'/>
<id>urn:sha1:9d9e6bde3df4ec6af0cc7dac328f8d8555aa36f9</id>
<content type='text'>
Add team_create() and team_destroy() to manage team netdevices.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: lib: Add require_command()</title>
<updated>2018-07-30T16:47:21Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2018-07-30T14:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e094574f9bf806fb89a285c0a0263a46a1d536f9'/>
<id>urn:sha1:e094574f9bf806fb89a285c0a0263a46a1d536f9</id>
<content type='text'>
The logic for testing whether a certain command is available is used
several times in the current code base. The tests in follow-up patches
add more requirements like that.

Therefore extract the logic into a named function, require_command(),
that can be used directly from lib.sh as well as from any test that
wishes to declare dependence on some command.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: add tests for TC chains creation adn destruction</title>
<updated>2018-07-24T03:44:13Z</updated>
<author>
<name>Jiri Pirko</name>
</author>
<published>2018-07-23T07:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d73c8871fae2da72f4717c15d4256ec6ba208c4'/>
<id>urn:sha1:2d73c8871fae2da72f4717c15d4256ec6ba208c4</id>
<content type='text'>
Add basic sanity tests for TC chains.

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: move shblock tc support check to a separate helper</title>
<updated>2018-07-24T03:44:13Z</updated>
<author>
<name>Jiri Pirko</name>
</author>
<published>2018-07-23T07:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f333cbf2b5bb48045e4f31de1c33fb701ffa45a'/>
<id>urn:sha1:7f333cbf2b5bb48045e4f31de1c33fb701ffa45a</id>
<content type='text'>
The shared block support is only needed for tc_shblock.sh. No need to
require that for other test.

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