summaryrefslogtreecommitdiff
path: root/rust/helpers/mm.c
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2025-09-25 19:31:55 +0200
committerJakub Kicinski <kuba@kernel.org>2025-09-26 17:48:40 -0700
commit040a6cbead5d6be72eec0444af48241693241f8d (patch)
tree20f07c371ffa961ff08481a2461f866a075f195f /rust/helpers/mm.c
parentf53748d56d1092657d30a094df92b11a24eadd12 (diff)
selftests: forwarding: lib: Add an autodefer variant of forwarding_enable()
Most forwarding tests invoke forwarding_enable() to enable the router and forwarding_restore() to restore the original configuration. Add a helper, adf_forwarding_enable(), which is like forwarding_enable(), but takes care of scheduling the cleanup automatically. Convert the tests that currently use defer to schedule the cleanup. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/78b752c40069cde21c44dcf4c7b966a76a0eef2c.1758821127.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/mm.c')
0 files changed, 0 insertions, 0 deletions