devlink: restart dump based on devlink instance ids (nested)
authorJakub Kicinski <kuba@kernel.org>
Thu, 5 Jan 2023 04:05:27 +0000 (20:05 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Jan 2023 06:13:39 +0000 (22:13 -0800)
commita8f947073f4ae489e8b9f3c19a17341cb260f660
treef8e5eee88e263b7faac89f97267f44c500e69bd9
parent731d69a6bd13b7c0cdbd3607edfa681269d54828
devlink: restart dump based on devlink instance ids (nested)

Use xarray id for cases of simple sub-object iteration.
We'll now use the state->instance for the devlink instances
and state->idx for subobject index.

Moving the definition of idx into the inner loop makes sense,
so while at it also move other sub-object local variables into
the loop.

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