<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/net/forwarding/lib.sh, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-12T14:42:23Z</updated>
<entry>
<title>selftests: forwarding: fix error message in learning_test</title>
<updated>2022-07-12T14:42:23Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-07-03T07:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9dec7b29760bb3f638defbcfae37a6712321fda'/>
<id>urn:sha1:e9dec7b29760bb3f638defbcfae37a6712321fda</id>
<content type='text'>
[ Upstream commit 83844aacab2015da1dba1df0cc61fc4b4c4e8076 ]

When packets are not received, they aren't received on $host1_if, so the
message talking about the second host not receiving them is incorrect.
Fix it.

Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: fix learning_test when h1 supports IFF_UNICAST_FLT</title>
<updated>2022-07-12T14:42:22Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-07-03T07:36:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95207b04c12a952ac5df22e2a06da1f58423b277'/>
<id>urn:sha1:95207b04c12a952ac5df22e2a06da1f58423b277</id>
<content type='text'>
[ Upstream commit 1a635d3e1c80626237fdae47a5545b6655d8d81c ]

The first host interface has by default no interest in receiving packets
MAC DA de:ad:be:ef:13:37, so it might drop them before they hit the tc
filter and this might confuse the selftest.

Enable promiscuous mode such that the filter properly counts received
packets.

Fixes: d4deb01467ec ("selftests: forwarding: Add a test for FDB learning")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Tested-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: fix flood_unicast_test when h2 supports IFF_UNICAST_FLT</title>
<updated>2022-07-12T14:42:22Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-07-03T07:36:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=586eb389d6cf9c40ec4db76bcf5bf61ea3d98a2e'/>
<id>urn:sha1:586eb389d6cf9c40ec4db76bcf5bf61ea3d98a2e</id>
<content type='text'>
[ Upstream commit b8e629b05f5d23f9649c901bef09fab8b0c2e4b9 ]

As mentioned in the blamed commit, flood_unicast_test() works by
checking the match count on a tc filter placed on the receiving
interface.

But the second host interface (host2_if) has no interest in receiving a
packet with MAC DA de:ad:be:ef:13:37, so its RX filter drops it even
before the ingress tc filter gets to be executed. So we will incorrectly
get the message "Packet was not flooded when should", when in fact, the
packet was flooded as expected but dropped due to an unrelated reason,
at some other layer on the receiving side.

Force h2 to accept this packet by temporarily placing it in promiscuous
mode. Alternatively we could either deliver to its MAC address or use
tcpdump_start, but this has the fewest complications.

This fixes the "flooding" test from bridge_vlan_aware.sh and
bridge_vlan_unaware.sh, which calls flood_test from the lib.

Fixes: 236dd50bf67a ("selftests: forwarding: Add a test for flooded traffic")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Tested-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: netdevsim: hw_stats_l3: Add a new test</title>
<updated>2022-03-15T13:00:51Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2022-03-14T14:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b18942e9993aef24bdeb294adf1d48c305188bd'/>
<id>urn:sha1:9b18942e9993aef24bdeb294adf1d48c305188bd</id>
<content type='text'>
Add a test that verifies basic UAPI contracts, netdevsim operation,
rollbacks after partial enablement in core, and UAPI notifications.

Signed-off-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: forwarding: tests of locked port feature</title>
<updated>2022-02-23T12:52:34Z</updated>
<author>
<name>Hans Schultz</name>
</author>
<published>2022-02-23T10:16:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2b681a412517bf477238de62b1d227361fa04fe'/>
<id>urn:sha1:b2b681a412517bf477238de62b1d227361fa04fe</id>
<content type='text'>
These tests check that the basic locked port feature works, so that
no 'host' can communicate (ping) through a locked port unless the
MAC address of the 'host' interface is in the forwarding database of
the bridge.

Signed-off-by: Hans Schultz &lt;schultz.hans+netdev@gmail.com&gt;
Acked-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: net: bridge: Parameterize ageing timeout</title>
<updated>2022-02-03T14:05:56Z</updated>
<author>
<name>Tobias Waldekranz</name>
</author>
<published>2022-02-03T10:16:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=081197591769a7389ef6696bc10f32cd43c0cb6e'/>
<id>urn:sha1:081197591769a7389ef6696bc10f32cd43c0cb6e</id>
<content type='text'>
Allow the ageing timeout that is set on bridges to be customized from
forwarding.config. This allows the tests to be run on hardware which
does not support a 10s timeout (e.g. mv88e6xxx).

Signed-off-by: Tobias Waldekranz &lt;tobias@waldekranz.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: lib.sh: Add PING_COUNT to allow sending configurable amount of packets</title>
<updated>2021-12-23T01:14:32Z</updated>
<author>
<name>Amit Cohen</name>
</author>
<published>2021-12-21T14:49:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0cd0b1f7a6e4e9b3b3ce62d6130af60259e103cd'/>
<id>urn:sha1:0cd0b1f7a6e4e9b3b3ce62d6130af60259e103cd</id>
<content type='text'>
Currently `ping_do()` and `ping6_do()` send 10 packets.

There are cases that it is not possible to catch only the interesting
packets using tc rule, so then, it is possible to send many packets and
verify that at least this amount of packets hit the rule.

Add `PING_COUNT` variable, which is set to 10 by default, to allow tests
sending more than 10 packets using the existing ping API.

Signed-off-by: Amit Cohen &lt;amcohen@nvidia.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: mlxsw: Add helpers for skipping selftests</title>
<updated>2021-10-25T13:10:11Z</updated>
<author>
<name>Petr Machata</name>
</author>
<published>2021-10-24T07:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8bfafe43481e0b053694227bb013150f10db3ae'/>
<id>urn:sha1:b8bfafe43481e0b053694227bb013150f10db3ae</id>
<content type='text'>
A number of mlxsw-specific selftests currently detect whether they are run
on a compatible machine, and bail out silently when not. These tests are
however done in a somewhat impenetrable manner by directly comparing PCI
IDs against a blacklist or a whitelist, and bailing out silently if the
machine is not compatible.

Instead, add a helper, mlxsw_only_on_spectrum(), which allows specifying
the supported machines in a human-readable manner. If the current machine
is incompatible, the helper emits a SKIP message and returns an error code,
based on which the caller can gracefully bail out in a suitable way. This
allows a more readable conditions such as:

	mlxsw_only_on_spectrum 2+ || return

Convert all existing open-coded guards to the new helper. Also add two new
guards to do_mark_test() and do_drop_test(), which are supported only on
Spectrum-2+, but the corresponding check was not there.

Signed-off-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: lib: forwarding: allow tests to not require mz and jq</title>
<updated>2021-10-25T11:59:42Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2021-10-24T17:17:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d70b51f2845d4a0352361fd4f9741913a2cf2145'/>
<id>urn:sha1:d70b51f2845d4a0352361fd4f9741913a2cf2145</id>
<content type='text'>
These programs are useful, but not all selftests require them.

Additionally, on embedded boards without package management (things like
buildroot), installing mausezahn or jq is not always as trivial as
downloading a package from the web.

So it is actually a bit annoying to require programs that are not used.
Introduce options that can be set by scripts to not enforce these
dependencies. For compatibility, default to "yes".

Cc: Nikolay Aleksandrov &lt;nikolay@nvidia.com&gt;
Cc: Ido Schimmel &lt;idosch@nvidia.com&gt;
Cc: Guillaume Nault &lt;gnault@redhat.com&gt;
Cc: Po-Hsu Lin &lt;po-hsu.lin@canonical.com&gt;
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "Merge branch 'dsa-rtnl'"</title>
<updated>2021-10-25T11:59:25Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2021-10-25T11:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d7e73f09fc2f5d968ca375f047718cf25ae2b92'/>
<id>urn:sha1:2d7e73f09fc2f5d968ca375f047718cf25ae2b92</id>
<content type='text'>
This reverts commit 965e6b262f48257dbdb51b565ecfd84877a0ab5f, reversing
changes made to 4d98bb0d7ec2d0b417df6207b0bafe1868bad9f8.
</content>
</entry>
</feed>
