<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/drivers/net/netdevsim, branch v6.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-10-13T09:43:13Z</updated>
<entry>
<title>selftests: netdevsim: use suitable existing dummy file for flash test</title>
<updated>2023-10-13T09:43:13Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-10-10T14:44:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6151ff9c75210c0f9d3d9ddcd3de6325de12c2a0'/>
<id>urn:sha1:6151ff9c75210c0f9d3d9ddcd3de6325de12c2a0</id>
<content type='text'>
The file name used in flash test was "dummy" because at the time test
was written, drivers were responsible for file request and as netdevsim
didn't do that, name was unused. However, the file load request is
now done in devlink code and therefore the file has to exist.
Use first random file from /lib/firmware for this purpose.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sefltests: netdevsim: wait for devlink instance after netns removal</title>
<updated>2023-02-21T12:02:42Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-02-20T13:23:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f922c7b1c1c45740d329bf248936fdb78c0cff6e'/>
<id>urn:sha1:f922c7b1c1c45740d329bf248936fdb78c0cff6e</id>
<content type='text'>
When devlink instance is put into network namespace and that network
namespace gets deleted, devlink instance is moved back into init_ns.
This is done as a part of cleanup_net() routine. Since cleanup_net()
is called asynchronously from workqueue, there is no guarantee that
the devlink instance move is done after "ip netns del" returns.

So fix this race by making sure that the devlink instance is present
before any other operation.

Reported-by: Amir Tzin &lt;amirtz@nvidia.com&gt;
Fixes: b74c37fd35a2 ("selftests: netdevsim: add tests for devlink reload with resources")
Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Pavan Chebbi &lt;pavan.chebbi@broadcom.com&gt;
Link: https://lore.kernel.org/r/20230220132336.198597-1-jiri@resnulli.us
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: devlink: add a warning for interfaces coming up</title>
<updated>2022-12-16T10:21:37Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-12-15T02:01:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d1c4a3469e73730f7cbbcec661c2a9081af1aa45'/>
<id>urn:sha1:d1c4a3469e73730f7cbbcec661c2a9081af1aa45</id>
<content type='text'>
NetworkManager (and other daemons) may bring the interface up
and cause failures in quiescence checks. Print a helpful warning,
and take the interface down again.

I seem to forget about this every time I run these tests on a new VM.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: devlink: fix the fd redirect in dummy_reporter_test</title>
<updated>2022-12-16T10:21:36Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-12-15T02:01:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fc60e2ff972d3dca836bff0b08cbe503c4ca1ce'/>
<id>urn:sha1:2fc60e2ff972d3dca836bff0b08cbe503c4ca1ce</id>
<content type='text'>
$number + &gt; bash means redirect FD $number, e.g. commonly
used 2&gt; redirects stderr (fd 2). The test uses 8192&gt; to
write the number 8192 to a file, this results in:

  ./devlink.sh: line 499: 8192: Bad file descriptor

Oddly the test also papers over this issue by checking
for failure (expecting an error rather than success)
so it passes, anyway.

Fixes: ff18176ad806 ("selftests: Add a test of large binary to devlink health test")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: netdevsim: Add test cases for route deletion failure</title>
<updated>2022-07-29T11:21:02Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@nvidia.com</email>
</author>
<published>2022-07-28T11:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40823f3ee05f7f55cbd4419062a1a388249e88da'/>
<id>urn:sha1:40823f3ee05f7f55cbd4419062a1a388249e88da</id>
<content type='text'>
Add IPv4 and IPv6 test cases that ensure that we are not leaking a
reference on the nexthop device when we are unable to delete its
associated route.

Without the fix in a previous patch ("netdevsim: fib: Fix reference
count leak on route deletion failure") both test cases get stuck,
waiting for the reference to be released from the dummy device [1][2].

[1]
unregister_netdevice: waiting for dummy1 to become free. Usage count = 5
leaked reference.
 fib_check_nh+0x275/0x620
 fib_create_info+0x237c/0x4d30
 fib_table_insert+0x1dd/0x1d20
 inet_rtm_newroute+0x11b/0x200
 rtnetlink_rcv_msg+0x43b/0xd20
 netlink_rcv_skb+0x15e/0x430
 netlink_unicast+0x53b/0x800
 netlink_sendmsg+0x945/0xe40
 ____sys_sendmsg+0x747/0x960
 ___sys_sendmsg+0x11d/0x190
 __sys_sendmsg+0x118/0x1e0
 do_syscall_64+0x34/0x80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

[2]
unregister_netdevice: waiting for dummy1 to become free. Usage count = 5
leaked reference.
 fib6_nh_init+0xc46/0x1ca0
 ip6_route_info_create+0x1167/0x19a0
 ip6_route_add+0x27/0x150
 inet6_rtm_newroute+0x161/0x170
 rtnetlink_rcv_msg+0x43b/0xd20
 netlink_rcv_skb+0x15e/0x430
 netlink_unicast+0x53b/0x800
 netlink_sendmsg+0x945/0xe40
 ____sys_sendmsg+0x747/0x960
 ___sys_sendmsg+0x11d/0x190
 __sys_sendmsg+0x118/0x1e0
 do_syscall_64+0x34/0x80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Amit Cohen &lt;amcohen@nvidia.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test</title>
<updated>2022-05-18T13:06:50Z</updated>
<author>
<name>Danielle Ratson</name>
<email>danieller@nvidia.com</email>
</author>
<published>2022-05-18T07:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ba106fcd4b441c5d6e3d1219104e022ca470d00'/>
<id>urn:sha1:7ba106fcd4b441c5d6e3d1219104e022ca470d00</id>
<content type='text'>
hw_stats_l3.sh test is failing often for l3 stats shows less than 20
packets after 2 seconds sleep.

This is happening since there is a race between the 2 seconds sleep and
the netdevsim actually delivering the packets.

Increase the sleep time so the packets will be delivered successfully on
time.

Signed-off-by: Danielle Ratson &lt;danieller@nvidia.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: netdevsim: hw_stats_l3: Add a new test</title>
<updated>2022-03-15T13:00:51Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2022-03-14T14:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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: net: test ethtool -L vs mq</title>
<updated>2021-09-15T14:46:02Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-09-13T22:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d6a58996ee23f85745a8e42edaad7a2b86d1a83'/>
<id>urn:sha1:2d6a58996ee23f85745a8e42edaad7a2b86d1a83</id>
<content type='text'>
Add a selftest for checking mq children are visible after ethtool -L.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>testing: selftests: drivers: net: netdevsim: devlink: add test case for hard drop statistics</title>
<updated>2021-06-14T20:04:25Z</updated>
<author>
<name>Oleksandr Mazur</name>
<email>oleksandr.mazur@plvision.eu</email>
</author>
<published>2021-06-14T13:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a4f54798a53db5f94d6e0bd1b0bfe53900fc058'/>
<id>urn:sha1:7a4f54798a53db5f94d6e0bd1b0bfe53900fc058</id>
<content type='text'>
Add hard drop counter check testcase, to make sure netdevsim driver
properly handles the devlink hard drop counters get/set callbacks.

Signed-off-by: Oleksandr Mazur &lt;oleksandr.mazur@plvision.eu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: devlink_lib: Fix bouncing of netdevsim DEVLINK_DEV</title>
<updated>2021-06-08T21:39:07Z</updated>
<author>
<name>Petr Machata</name>
<email>petrm@nvidia.com</email>
</author>
<published>2021-06-08T12:44:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0521a262f043ea521790ed2976141086c75d2f74'/>
<id>urn:sha1:0521a262f043ea521790ed2976141086c75d2f74</id>
<content type='text'>
In the commit referenced below, a check was added to devlink_lib that
asserts the existence of a devlink device referenced by $DEVLINK_DEV.
Unfortunately, several netdevsim tests point DEVLINK_DEV at a device that
does not exist at the time that devlink_lib is sourced. Thus these tests
spuriously fail.

Fix this by introducing an override. By setting DEVLINK_DEV to an empty
string, the user declares their intention to handle DEVLINK_DEV management
on their own.

In all netdevsim tests that use devlink_lib and set DEVLINK_DEV, set
instead an empty DEVLINK_DEV just before sourcing devlink_lib, and set it
to the correct value right afterwards.

Fixes: 557c4d2f780c ("selftests: devlink_lib: add check for devlink device existence")
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>
</feed>
