<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/devlink.c, branch v5.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=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-11-12T00:04:21Z</updated>
<entry>
<title>devlink: Add method for time-stamp on reporter's dump</title>
<updated>2019-11-12T00:04:21Z</updated>
<author>
<name>Aya Levin</name>
<email>ayal@mellanox.com</email>
</author>
<published>2019-11-10T12:11:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d279505b723cba058b604ed8cf9cd4c854e2a041'/>
<id>urn:sha1:d279505b723cba058b604ed8cf9cd4c854e2a041</id>
<content type='text'>
When setting the dump's time-stamp, use ktime_get_real in addition to
jiffies. This simplifies the user space implementation and bypasses
some inconsistent behavior with translating jiffies to current time.
The time taken is transformed into nsec, to comply with y2038 issue.

Fixes: c8e1da0bf923 ("devlink: Add health report functionality")
Signed-off-by: Aya Levin &lt;ayal@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: disallow reload operation during device cleanup</title>
<updated>2019-11-10T03:38:36Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-11-09T10:29:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a508a254bed9a2e36a5fb96c9065532a6bf1e9c'/>
<id>urn:sha1:5a508a254bed9a2e36a5fb96c9065532a6bf1e9c</id>
<content type='text'>
There is a race between driver code that does setup/cleanup of device
and devlink reload operation that in some drivers works with the same
code. Use after free could we easily obtained by running:

while true; do
        echo "0000:00:10.0" &gt;/sys/bus/pci/drivers/mlxsw_spectrum2/bind
        devlink dev reload pci/0000:00:10.0 &amp;
        echo "0000:00:10.0" &gt;/sys/bus/pci/drivers/mlxsw_spectrum2/unbind
done

Fix this by enabling reload only after setup of device is complete and
disabling it at the beginning of the cleanup process.

Reported-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Fixes: 2d8dc5bbf4e7 ("devlink: Add support for reload")
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: Fix error handling in param and info_get dumpit cb</title>
<updated>2019-10-01T17:08:30Z</updated>
<author>
<name>Vasundhara Volam</name>
<email>vasundhara-v.volam@broadcom.com</email>
</author>
<published>2019-09-30T06:22:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93c2fcb01ae919b6e882b0931383d33aaa9bf7a6'/>
<id>urn:sha1:93c2fcb01ae919b6e882b0931383d33aaa9bf7a6</id>
<content type='text'>
If any of the param or info_get op returns error, dumpit cb is
skipping to dump remaining params or info_get ops for all the
drivers.

Fix to not return if any of the param/info_get op returns error
as not supported and continue to dump remaining information.

v2: Modify the patch to return error, except for params/info_get
op that return -EOPNOTSUPP as suggested by Andrew Lunn. Also, modify
commit message to reflect the same.

Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Jiri Pirko &lt;jiri@mellanox.com&gt;
Cc: Michael Chan &lt;michael.chan@broadcom.com&gt;
Signed-off-by: Vasundhara Volam &lt;vasundhara-v.volam@broadcom.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: devlink: move reload fail indication to devlink core and expose to user</title>
<updated>2019-09-13T20:11:14Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-09-12T08:49:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2670ac2625f98557fd7e083f8aa22c297e49039e'/>
<id>urn:sha1:2670ac2625f98557fd7e083f8aa22c297e49039e</id>
<content type='text'>
Currently the fact that devlink reload failed is stored in drivers.
Move this flag into devlink core. Also, expose it to the user.

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>net: devlink: split reload op into two</title>
<updated>2019-09-13T20:11:14Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@mellanox.com</email>
</author>
<published>2019-09-12T08:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97691069dc5a4135e413d3d92200d70b46df9fe5'/>
<id>urn:sha1:97691069dc5a4135e413d3d92200d70b46df9fe5</id>
<content type='text'>
In order to properly implement failure indication during reload,
split the reload op into two ops, one for down phase and one for
up phase.

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 'reset_dev_on_drv_probe' param</title>
<updated>2019-09-10T16:29:26Z</updated>
<author>
<name>Dirk van der Merwe</name>
<email>dirk.vandermerwe@netronome.com</email>
</author>
<published>2019-09-08T23:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5bbd21df5a075a59ab53030d25f9848ccca93d73'/>
<id>urn:sha1:5bbd21df5a075a59ab53030d25f9848ccca93d73</id>
<content type='text'>
Add the 'reset_dev_on_drv_probe' devlink parameter, controlling the
device reset policy on driver probe.

This parameter is useful in conjunction with the existing
'fw_load_policy' parameter.

Signed-off-by: Dirk van der Merwe &lt;dirk.vandermerwe@netronome.com&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: Simon Horman &lt;simon.horman@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: Use switch-case instead of if-else</title>
<updated>2019-09-01T06:46:13Z</updated>
<author>
<name>Parav Pandit</name>
<email>parav@mellanox.com</email>
</author>
<published>2019-08-30T10:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58b6be4175a4b4a58210bf171ac90886244da98c'/>
<id>urn:sha1:58b6be4175a4b4a58210bf171ac90886244da98c</id>
<content type='text'>
Make core more readable with switch-case for various port flavours.

Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Parav Pandit &lt;parav@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: Make port index data type as unsigned int</title>
<updated>2019-09-01T06:46:13Z</updated>
<author>
<name>Parav Pandit</name>
<email>parav@mellanox.com</email>
</author>
<published>2019-08-30T10:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7282b501f22a21ac8dfb6d3856aa1a92a7df5d5'/>
<id>urn:sha1:c7282b501f22a21ac8dfb6d3856aa1a92a7df5d5</id>
<content type='text'>
Devlink port index attribute is returned to users as u32 through
netlink response.
Change index data type from 'unsigned' to 'unsigned int' to avoid
below checkpatch.pl warning.

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
81: FILE: include/net/devlink.h:81:
+       unsigned index;

Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Parav Pandit &lt;parav@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>devlink: Add generic packet traps and groups</title>
<updated>2019-08-17T19:40:08Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2019-08-17T13:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=391203ab11df9b23cd0b867122bccbe33fe16f02'/>
<id>urn:sha1:391203ab11df9b23cd0b867122bccbe33fe16f02</id>
<content type='text'>
Add generic packet traps and groups that can report dropped packets as
well as exceptions such as TTL error.

Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Acked-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 packet trap infrastructure</title>
<updated>2019-08-17T19:40:08Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2019-08-17T13:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f420b6c52e9799f664429e739a421fb4c5527a3'/>
<id>urn:sha1:0f420b6c52e9799f664429e739a421fb4c5527a3</id>
<content type='text'>
Add the basic packet trap infrastructure that allows device drivers to
register their supported packet traps and trap groups with devlink.

Each driver is expected to provide basic information about each
supported trap, such as name and ID, but also the supported metadata
types that will accompany each packet trapped via the trap. The
currently supported metadata type is just the input port, but more will
be added in the future. For example, output port and traffic class.

Trap groups allow users to set the action of all member traps. In
addition, users can retrieve per-group statistics in case per-trap
statistics are too narrow. In the future, the trap group object can be
extended with more attributes, such as policer settings which will limit
the amount of traffic generated by member traps towards the CPU.

Beside registering their packet traps with devlink, drivers are also
expected to report trapped packets to devlink along with relevant
metadata. devlink will maintain packets and bytes statistics for each
packet trap and will potentially report the trapped packet with its
metadata to user space via drop monitor netlink channel.

The interface towards the drivers is simple and allows devlink to set
the action of the trap. Currently, only two actions are supported:
'trap' and 'drop'. When set to 'trap', the device is expected to provide
the sole copy of the packet to the driver which will pass it to devlink.
When set to 'drop', the device is expected to drop the packet and not
send a copy to the driver. In the future, more actions can be added,
such as 'mirror'.

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