2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

odp-execute: Add command to switch action implementation.

This commit adds a new command to allow the user to switch
the active action implementation at runtime.

Usage:
  $ ovs-appctl odp-execute/action-impl-set scalar

This commit also adds a new command to retrieve the list of available
action implementations. This can be used by to check what implementations
of actions are available and what implementation is active during runtime.

Usage:
   $ ovs-appctl odp-execute/action-impl-show

Added separate test-case for ovs-actions show/set commands:
odp-execute - actions implementation

Signed-off-by: Emma Finn <emma.finn@intel.com>
Signed-off-by: Kumar Amber <kumar.amber@intel.com>
Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
Co-authored-by: Kumar Amber <kumar.amber@intel.com>
Co-authored-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Emma Finn
2022-07-15 10:16:17 +00:00
committed by Ian Stokes
parent eec8227614
commit 1713fc0116
8 changed files with 111 additions and 0 deletions

View File

@@ -67,6 +67,18 @@ odp_execute_action_set(const char *name)
return NULL;
}
void
odp_execute_action_get_info(struct ds *string)
{
ds_put_cstr(string, "Available Actions implementations:\n");
for (int i = 0; i < ACTION_IMPL_MAX; i++) {
ds_put_format(string, " %s (available: %s, active: %s)\n",
action_impls[i].name,
action_impls[i].available ? "Yes" : "No",
i == active_action_impl_index ? "Yes" : "No");
}
}
void
odp_execute_action_init(void)
{