devlink: Hang reporter's dump method on a dumpit cb
authorAya Levin <ayal@mellanox.com>
Thu, 16 May 2019 06:49:20 +0000 (09:49 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Jun 2019 20:23:16 +0000 (13:23 -0700)
commite44ef4e4516cce783e95d7221936aa9a4f325ad9
tree1a8d0f6e0339feb7486b776656d8fb5363e1bbf3
parenta842fe1425cb20f457abd3f8ef98b468f83ca98b
devlink: Hang reporter's dump method on a dumpit cb

The devlink health reporter provides a dump method on an error. Dump
may contain a large amount of data, in this case doit cb isn't sufficient.
This is because the user side is blocking and doesn't allow draining of
the socket until the socket runs out of buffers. Using dumpit cb
is the correct way to go.
Please note that thankfully the dump op is not yet implemented in any
driver and therefore this change is not breaking userspace.

Fixes: 35455e23e6f3 ("devlink: Add health dump {get,clear} commands")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
net/core/devlink.c