<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/devlink/devl_internal.h, branch v6.4</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.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-05-12T01:06:50Z</updated>
<entry>
<title>devlink: change per-devlink netdev notifier to static one</title>
<updated>2023-05-12T01:06:50Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-05-10T14:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e93c9378e33f68b61ea9318580d841caa22fb9ea'/>
<id>urn:sha1:e93c9378e33f68b61ea9318580d841caa22fb9ea</id>
<content type='text'>
The commit 565b4824c39f ("devlink: change port event netdev notifier
from per-net to global") changed original per-net notifier to be
per-devlink instance. That fixed the issue of non-receiving events
of netdev uninit if that moved to a different namespace.
That worked fine in -net tree.

However, later on when commit ee75f1fc44dd ("net/mlx5e: Create
separate devlink instance for ethernet auxiliary device") and
commit 72ed5d5624af ("net/mlx5: Suspend auxiliary devices only in
case of PCI device suspend") were merged, a deadlock was introduced
when removing a namespace with devlink instance with another nested
instance.

Here there is the bad flow example resulting in deadlock with mlx5:
net_cleanup_work -&gt; cleanup_net (takes down_read(&amp;pernet_ops_rwsem) -&gt;
devlink_pernet_pre_exit() -&gt; devlink_reload() -&gt;
mlx5_devlink_reload_down() -&gt; mlx5_unload_one_devl_locked() -&gt;
mlx5_detach_device() -&gt; del_adev() -&gt; mlx5e_remove() -&gt;
mlx5e_destroy_devlink() -&gt; devlink_free() -&gt;
unregister_netdevice_notifier() (takes down_write(&amp;pernet_ops_rwsem)

Steps to reproduce:
$ modprobe mlx5_core
$ ip netns add ns1
$ devlink dev reload pci/0000:08:00.0 netns ns1
$ ip netns del ns1

Resolve this by converting the notifier from per-devlink instance to
a static one registered during init phase and leaving it registered
forever. Use this notifier for all devlink port instances created
later on.

Note what a tree needs this fix only in case all of the cited fixes
commits are present.

Reported-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Fixes: 565b4824c39f ("devlink: change port event netdev notifier from per-net to global")
Fixes: ee75f1fc44dd ("net/mlx5e: Create separate devlink instance for ethernet auxiliary device")
Fixes: 72ed5d5624af ("net/mlx5: Suspend auxiliary devices only in case of PCI device suspend")
Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Link: https://lore.kernel.org/r/20230510144621.932017-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Move health common function to health file</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12af29e7790af811611409194f61d054e54365b9'/>
<id>urn:sha1:12af29e7790af811611409194f61d054e54365b9</id>
<content type='text'>
Now that all devlink health callbacks and related code are in file
health.c move common health functions and devlink_health_reporter struct
to be local in health.c file.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Move devlink health test to health file</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9311ee13f0ebd6d684793f88b91092672c21171'/>
<id>urn:sha1:c9311ee13f0ebd6d684793f88b91092672c21171</id>
<content type='text'>
Move devlink health report test callback from leftover.c to health.c. No
functional change in this patch.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Move devlink health dump to health file</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7004c6c45761143836d3c8122d91264320d87e8e'/>
<id>urn:sha1:7004c6c45761143836d3c8122d91264320d87e8e</id>
<content type='text'>
Move devlink health report dump callbacks and related code from
leftover.c to health.c. No functional change in this patch.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Move devlink fmsg and health diagnose to health file</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:38:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a929df7fd9c6fbfb4ebbed7c9cf96657e9f622b6'/>
<id>urn:sha1:a929df7fd9c6fbfb4ebbed7c9cf96657e9f622b6</id>
<content type='text'>
Devlink fmsg (formatted message) is used by devlink health diagnose,
dump and drivers which support these devlink health callbacks.
Therefore, move devlink fmsg helpers and related code to file health.c.
Move devlink health diagnose to file health.c. No functional change in
this patch.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Move devlink health report and recover to health file</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55b9b249685214cc700113e6b677b78d2c0b97f9'/>
<id>urn:sha1:55b9b249685214cc700113e6b677b78d2c0b97f9</id>
<content type='text'>
Move devlink health report helper and recover callback and related code
from leftover.c to health.c. No functional change in this patch.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Move devlink health get and set code to health file</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db6b5f3ec400479c0906be6884c9ecceaf0b8c46'/>
<id>urn:sha1:db6b5f3ec400479c0906be6884c9ecceaf0b8c46</id>
<content type='text'>
Move devlink health get and set callbacks and related code from
leftover.c to health.c. No functional change in this patch.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: Split out health reporter create code</title>
<updated>2023-02-16T03:15:44Z</updated>
<author>
<name>Moshe Shemesh</name>
<email>moshe@nvidia.com</email>
</author>
<published>2023-02-14T16:37:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4740e3a8137faa5831c690d0bf0b46f41008baf'/>
<id>urn:sha1:b4740e3a8137faa5831c690d0bf0b46f41008baf</id>
<content type='text'>
Move devlink health reporter create/destroy and related dev code to new
file health.c. This file shall include all callbacks and functionality
that are related to devlink health.

In addition, fix kdoc indentation and make reporter create/destroy kdoc
more clear. No functional change in this patch.

Signed-off-by: Moshe Shemesh &lt;moshe@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: convert param list to xarray</title>
<updated>2023-02-13T09:49:14Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-02-10T10:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a72e17b4523223015d3b3fd79bac2b065d6d09a9'/>
<id>urn:sha1:a72e17b4523223015d3b3fd79bac2b065d6d09a9</id>
<content type='text'>
Loose the linked list for params and use xarray instead.

Note that this is required to be eventually possible to call
devl_param_driverinit_value_get() without holding instance lock.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Acked-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: make sure driver does not read updated driverinit param before reload</title>
<updated>2023-02-13T09:49:14Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-02-10T10:01:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=afd888c3e19ceb5247158fe2fabbf7234937a515'/>
<id>urn:sha1:afd888c3e19ceb5247158fe2fabbf7234937a515</id>
<content type='text'>
The driverinit param purpose is to serve the driver during init/reload
time to provide a value, either default or set by user.

Make sure that driver does not read value updated by user before the
reload is performed. Hold the new value in a separate struct and switch
it during reload.

Note that this is required to be eventually possible to call
devl_param_driverinit_value_get() without holding instance lock.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
