devlink: add by-instance dump infra
Most dumpit implementations walk the devlink instances. This requires careful lock taking and reference dropping. Factor the loop out and provide just a callback to handle a single instance dump. Convert one user as an example, other users converted in the next change. Slightly inspired by ethtool netlink code. Reviewed-by:Jacob Keller <jacob.e.keller@intel.com> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
Showing
Please register or sign in to comment