<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/devlink.h, branch v4.17.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-04-08T16:45:57+00:00</updated>
<entry>
<title>devlink: convert occ_get op to separate registration</title>
<updated>2018-04-08T16:45:57+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2018-04-05T20:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc56be47da8cb111add373c36230b0139139898f'/>
<id>urn:sha1:fc56be47da8cb111add373c36230b0139139898f</id>
<content type='text'>
This resolves race during initialization where the resources with
ops are registered before driver and the structures used by occ_get
op is initialized. So keep occ_get callbacks registered only when
all structs are initialized.

The example flows, as it is in mlxsw:
1) driver load/asic probe:
   mlxsw_core
      -&gt; mlxsw_sp_resources_register
        -&gt; mlxsw_sp_kvdl_resources_register
          -&gt; devlink_resource_register IDX
   mlxsw_spectrum
      -&gt; mlxsw_sp_kvdl_init
        -&gt; mlxsw_sp_kvdl_parts_init
          -&gt; mlxsw_sp_kvdl_part_init
            -&gt; devlink_resource_size_get IDX (to get the current setup
                                              size from devlink)
        -&gt; devlink_resource_occ_get_register IDX (register current
                                                  occupancy getter)
2) reload triggered by devlink command:
  -&gt; mlxsw_devlink_core_bus_device_reload
    -&gt; mlxsw_sp_fini
      -&gt; mlxsw_sp_kvdl_fini
	-&gt; devlink_resource_occ_get_unregister IDX
    (struct mlxsw_sp *mlxsw_sp is freed at this point, call to occ get
     which is using mlxsw_sp would cause use-after free)
    -&gt; mlxsw_sp_init
      -&gt; mlxsw_sp_kvdl_init
        -&gt; mlxsw_sp_kvdl_parts_init
          -&gt; mlxsw_sp_kvdl_part_init
            -&gt; devlink_resource_size_get IDX (to get the current setup
                                              size from devlink)
        -&gt; devlink_resource_occ_get_register IDX (register current
                                                  occupancy getter)

Fixes: d9f9b9a4d05f ("devlink: Add support for resource abstraction")
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>devlink: Remove top_hierarchy arg for DEVLINK disabled path</title>
<updated>2018-03-23T16:14:18+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsahern@gmail.com</email>
</author>
<published>2018-03-23T15:09:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9de0018d1fa97f8db9a39fcb69b55266c52835b'/>
<id>urn:sha1:e9de0018d1fa97f8db9a39fcb69b55266c52835b</id>
<content type='text'>
Earlier change missed the path where CONFIG_NET_DEVLINK is disabled.
Thanks to Jiri for spotting.

Fixes: 145307460ba9 ("devlink: Remove top_hierarchy arg to devlink_resource_register")
Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: Remove top_hierarchy arg to devlink_resource_register</title>
<updated>2018-03-22T17:08:41+00:00</updated>
<author>
<name>David Ahern</name>
<email>dsahern@gmail.com</email>
</author>
<published>2018-03-21T02:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=145307460ba9c11489807de7acd3f4c7395f60b7'/>
<id>urn:sha1:145307460ba9c11489807de7acd3f4c7395f60b7</id>
<content type='text'>
top_hierarchy arg can be determined by comparing parent_resource_id to
DEVLINK_RESOURCE_ID_PARENT_TOP so it does not need to be a separate
argument.

Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-03-06T06:20:46+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-03-06T05:53:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70'/>
<id>urn:sha1:0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70</id>
<content type='text'>
All of the conflicts were cases of overlapping changes.

In net/core/devlink.c, we have to make care that the
resouce size_params have become a struct member rather
than a pointer to such an object.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mlxsw: spectrum: Fix handling of resource_size_param</title>
<updated>2018-02-28T17:32:36+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2018-02-28T12:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77d270967c5f723e5910dd073962b6372d7ef466'/>
<id>urn:sha1:77d270967c5f723e5910dd073962b6372d7ef466</id>
<content type='text'>
Current code uses global variables, adjusts them and passes pointer down
to devlink. With every other mlxsw_core instance, the previously passed
pointer values are rewritten. Fix this by de-globalize the variables and
also memcpy size_params during devlink resource registration.
Also, introduce a convenient size_param_init helper.

Fixes: ef3116e5403e ("mlxsw: spectrum: Register KVD resources with devlink")
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>devlink: Perform cleanup of resource_set cb</title>
<updated>2018-02-20T18:38:54+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2018-02-20T07:44:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f4bbf7c4e3d4bd14987a13041c6b5b1ea59e21f'/>
<id>urn:sha1:4f4bbf7c4e3d4bd14987a13041c6b5b1ea59e21f</id>
<content type='text'>
After adding size validation logic into core cleanup is required.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
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>devlink: Add relation between dpipe and resource</title>
<updated>2018-01-16T19:15:34+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2018-01-15T07:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56dc7cd0a87a1ff4f49ee1e67bd88e768385d51a'/>
<id>urn:sha1:56dc7cd0a87a1ff4f49ee1e67bd88e768385d51a</id>
<content type='text'>
The hardware processes which are modeled via dpipe commonly use some
internal hardware resources. Such relation can improve the understanding
of hardware limitations. The number of resource's unit consumed per
table's entry are also provided for each table.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
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>devlink: Add support for reload</title>
<updated>2018-01-16T19:15:34+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2018-01-15T07:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d8dc5bbf4e7603747875eb5cadcd67c1fa8b1bb'/>
<id>urn:sha1:2d8dc5bbf4e7603747875eb5cadcd67c1fa8b1bb</id>
<content type='text'>
Add support for performing driver hot reload.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
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>devlink: Add support for resource abstraction</title>
<updated>2018-01-16T19:15:34+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2018-01-15T07:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9f9b9a4d05fab693fd23a9ecaa330e03ebe2c31'/>
<id>urn:sha1:d9f9b9a4d05fab693fd23a9ecaa330e03ebe2c31</id>
<content type='text'>
Add support for hardware resource abstraction over devlink. Each resource
is identified via id, furthermore it contains information regarding its
size and its related sub resources. Each resource can also provide its
current occupancy.

In some cases the sizes of some resources can be changed, yet for those
changes to take place a hot driver reload may be needed. The reload
capability will be introduced in the next patch.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
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>devlink: Add per devlink instance lock</title>
<updated>2018-01-16T19:15:34+00:00</updated>
<author>
<name>Arkadi Sharshevsky</name>
<email>arkadis@mellanox.com</email>
</author>
<published>2018-01-15T07:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2406e7e546b223e8cf42c44ac7352d4d1fd1dbcd'/>
<id>urn:sha1:2406e7e546b223e8cf42c44ac7352d4d1fd1dbcd</id>
<content type='text'>
This is a preparation before introducing resources and hot reload support.
Currently there are two global lock where one protects all devlink access,
and the second one protects devlink port access. This patch adds per devlink
instance lock which protects the internal members which are the sb/dpipe/
resource/ports. By introducing this lock the global devlink port lock can
be discarded.

Signed-off-by: Arkadi Sharshevsky &lt;arkadis@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
