<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/devlink.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-02-13T09:49:14Z</updated>
<entry>
<title>devlink: fix the name of value arg of devl_param_driverinit_value_get()</title>
<updated>2023-02-13T09:49:14Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-02-10T10:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94ba1c316b9c0f9b017f7cd7eac84adae693e80f'/>
<id>urn:sha1:94ba1c316b9c0f9b017f7cd7eac84adae693e80f</id>
<content type='text'>
Probably due to copy-paste error, the name of the arg is "init_val"
which is misleading, as the pointer is used to point to struct where to
store the current value. Rename it to "val" and change the arg comment
a bit on the way.

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>
<entry>
<title>devlink: remove devlink features</title>
<updated>2023-01-30T08:37:46Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-27T15:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb8421a94c5613fee86e192bab0892ecb1d56e4c'/>
<id>urn:sha1:fb8421a94c5613fee86e192bab0892ecb1d56e4c</id>
<content type='text'>
Devlink features were introduced to disallow devlink reload calls of
userspace before the devlink was fully initialized. The reason for this
workaround was the fact that devlink reload was originally called
without devlink instance lock held.

However, with recent changes that converted devlink reload to be
performed under devlink instance lock, this is redundant so remove
devlink features entirely.

Note that mlx5 used this to enable devlink reload conditionally only
when device didn't act as multi port slave. Move the multi port check
into mlx5_devlink_reload_down() callback alongside with the other
checks preventing the device from reload in certain states.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&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: protect devlink param list by instance lock</title>
<updated>2023-01-27T12:32:02Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-26T07:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=075935f0ae0fbbe469a911d685f6cc59de892700'/>
<id>urn:sha1:075935f0ae0fbbe469a911d685f6cc59de892700</id>
<content type='text'>
Commit 1d18bb1a4ddd ("devlink: allow registering parameters after
the instance") as the subject implies introduced possibility to register
devlink params even for already registered devlink instance. This is a
bit problematic, as the consistency or params list was originally
secured by the fact it is static during devlink lifetime. So in order to
protect the params list, take devlink instance lock during the params
operations. Introduce unlocked function variants and use them in drivers
in locked context. Put lock assertions to appropriate places.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Tested-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: make devlink_param_driverinit_value_set() return void</title>
<updated>2023-01-27T12:32:02Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-26T07:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=85fe0b324c830ac671b811efc70ea80c3dcb2390'/>
<id>urn:sha1:85fe0b324c830ac671b811efc70ea80c3dcb2390</id>
<content type='text'>
devlink_param_driverinit_value_set() currently returns int with possible
error, but no user is checking it anyway. The only reason for a fail is
a driver bug. So convert the function to return void and put WARN_ONs
on error paths.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-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 devlink_param_register/unregister static</title>
<updated>2023-01-27T12:32:02Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-26T07:58:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=020dd127a3fef9dfc6c03cd5d1c231d5e55d7632'/>
<id>urn:sha1:020dd127a3fef9dfc6c03cd5d1c231d5e55d7632</id>
<content type='text'>
There is no user outside the devlink code, so remove the export and make
the functions static. Move them before callers to avoid forward
declarations.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-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: remove devl*_port_health_reporter_destroy()</title>
<updated>2023-01-20T03:08:37Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-18T15:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f167327efecc3977deff0c852760e3759b0c2a7'/>
<id>urn:sha1:9f167327efecc3977deff0c852760e3759b0c2a7</id>
<content type='text'>
Remove port-specific health reporter destroy function as it is
currently the same as the instance one so no longer needed. Inline
__devlink_health_reporter_destroy() as it is no longer called from
multiple places.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: remove reporters_lock</title>
<updated>2023-01-20T03:08:37Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-18T15:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1dea3b4e4c52f4bed64d1c527d548e82ccaea15a'/>
<id>urn:sha1:1dea3b4e4c52f4bed64d1c527d548e82ccaea15a</id>
<content type='text'>
Similar to other devlink objects, rely on devlink instance lock
and remove object specific reporters_lock.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: protect health reporter operation with instance lock</title>
<updated>2023-01-20T03:08:37Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-18T15:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dfdfd1305ddecb990566193f2ba8a11bccba4cde'/>
<id>urn:sha1:dfdfd1305ddecb990566193f2ba8a11bccba4cde</id>
<content type='text'>
Similar to other devlink objects, protect the reporters list
by devlink instance lock. Alongside add unlocked versions
of health reporter create/destroy functions and use them in drivers
on call paths where the instance lock is held.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>devlink: remove linecards lock</title>
<updated>2023-01-20T03:08:37Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@nvidia.com</email>
</author>
<published>2023-01-18T15:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cc9049cb9021a46ad5711a946eb3ded47eed0de'/>
<id>urn:sha1:5cc9049cb9021a46ad5711a946eb3ded47eed0de</id>
<content type='text'>
Similar to other devlink objects, convert the linecards list to be
protected by devlink instance lock. Alongside with that rename the
create/destroy() functions to devl_* to indicate the devlink instance
lock needs to be held while calling them.

Signed-off-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
