summaryrefslogtreecommitdiff
path: root/net/devlink/core.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-01-04 20:05:26 -0800
committerJakub Kicinski <kuba@kernel.org>2023-01-05 22:13:39 -0800
commit731d69a6bd13b7c0cdbd3607edfa681269d54828 (patch)
treee9a2013115acdc023cd1a363e9fba874e300996d /net/devlink/core.c
parenta0e13dfdc391dfb2a9b165e2475fb1796c9be98d (diff)
downloadlwn-731d69a6bd13b7c0cdbd3607edfa681269d54828.tar.gz
lwn-731d69a6bd13b7c0cdbd3607edfa681269d54828.zip
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>
Diffstat (limited to 'net/devlink/core.c')
-rw-r--r--net/devlink/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/devlink/core.c b/net/devlink/core.c
index 3a99bf84632e..371d6821315d 100644
--- a/net/devlink/core.c
+++ b/net/devlink/core.c
@@ -91,7 +91,7 @@ void devlink_put(struct devlink *devlink)
call_rcu(&devlink->rcu, __devlink_put_rcu);
}
-static struct devlink *
+struct devlink *
devlinks_xa_find_get(struct net *net, unsigned long *indexp,
void * (*xa_find_fn)(struct xarray *, unsigned long *,
unsigned long, xa_mark_t))