selftests: forwarding: lib: Add an autodefer variant of vrf_prepare()
Most forwarding tests invoke vrf_prepare() to set up VRF forwarding and vrf_cleanup() to restore the original configuration. Add a helper, adf_vrf_prepare(), which is like vrf_prepare(), but takes care of scheduling the cleanup automatically. Convert a number of 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/2f2000e54ae700d560a8d6128322dade3bd2207e.1758821127.git.petrm@nvidia.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
Loading
Please sign in to comment