diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-01-05 07:05:26 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-01-06 09:13:39 +0300 |
commit | 731d69a6bd13b7c0cdbd3607edfa681269d54828 (patch) | |
tree | e9a2013115acdc023cd1a363e9fba874e300996d /net/devlink/core.c | |
parent | a0e13dfdc391dfb2a9b165e2475fb1796c9be98d (diff) | |
download | linux-731d69a6bd13b7c0cdbd3607edfa681269d54828.tar.xz |
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.c | 2 |
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)) |