<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/net/forwarding/lib.sh, branch v4.19.237</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.237</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.237'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-11-24T07:21:02+00:00</updated>
<entry>
<title>selftests: forwarding: Have lldpad_app_wait_set() wait for unknown, too</title>
<updated>2019-11-24T07:21:02+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-10-08T18:50:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b80939a47413c08e1756e437c435e57ffe4b87d9'/>
<id>urn:sha1:b80939a47413c08e1756e437c435e57ffe4b87d9</id>
<content type='text'>
[ Upstream commit 372809055f6c830ff978564e09f58bcb9e9b937c ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: Move DSCP capture to lib.sh</title>
<updated>2018-08-01T16:52:30+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-07-31T22:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:30+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-07-31T22:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:21+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-07-30T14:39:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:21+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-07-30T14:39:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:21+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-07-30T14:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:13+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2018-07-23T07:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:13+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2018-07-23T07:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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>
<entry>
<title>selftests: forwarding: lib: extract ping and ping6 so they can be reused</title>
<updated>2018-07-04T12:40:02+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@cumulusnetworks.com</email>
</author>
<published>2018-07-03T12:42:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=967450c54300fd858b24e044ee960a1133c916a4'/>
<id>urn:sha1:967450c54300fd858b24e044ee960a1133c916a4</id>
<content type='text'>
Extract ping and ping6 command execution so the return value can be
checked by the caller, this is needed for port isolation tests that are
intended to fail.

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: lib: Parameterize NUM_NETIFS in two functions</title>
<updated>2018-06-30T13:06:15+00:00</updated>
<author>
<name>Petr Machata</name>
<email>petrm@mellanox.com</email>
</author>
<published>2018-06-30T00:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68d9cea594b5da185e5b048e9b4fa0dadeafe88a'/>
<id>urn:sha1:68d9cea594b5da185e5b048e9b4fa0dadeafe88a</id>
<content type='text'>
setup_wait() and tc_offload_check() both assume that all NUM_NETIFS
interfaces are relevant for a given test. However, the scale test script
acts as an umbrella for a number of sub-tests, some of which may not
require all the interfaces.

Thus it's suboptimal for tc_offload_check() to query all the interfaces.
In case of setup_wait() it's incorrect, because the sub-test in question
of course doesn't configure any interfaces beyond what it needs, and
setup_wait() then ends up waiting indefinitely for the extraneous
interfaces to come up.

For that reason, give setup_wait() and tc_offload_check() an optional
parameter with a number of interfaces to probe. Fall back to global
NUM_NETIFS if the parameter is not given.

Signed-off-by: Petr Machata &lt;petrm@mellanox.com&gt;
Reviewed-by: Yuval Mintz &lt;yuvalm@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
