devlink: restart dump based on devlink instance ids (simple)
authorJakub Kicinski <kuba@kernel.org>
Thu, 5 Jan 2023 04:05:26 +0000 (20:05 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Jan 2023 06:13:39 +0000 (22:13 -0800)
commit731d69a6bd13b7c0cdbd3607edfa681269d54828
treee9a2013115acdc023cd1a363e9fba874e300996d
parenta0e13dfdc391dfb2a9b165e2475fb1796c9be98d
devlink: restart dump based on devlink instance ids (simple)

xarray gives each devlink instance an id and allows us to restart
walk based on that id quite neatly. This is nice both from the
perspective of code brevity and from the stability of the dump
(devlink instances disappearing from before the resumption point
will not cause inconsistent dumps).

This patch takes care of simple cases where state->idx counts
devlink instances only.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/core.c
net/devlink/devl_internal.h
net/devlink/leftover.c