On 13 Jul 2022, at 20:28, Harry van Haaren wrote:
> From: Emma Finn <[email protected]>
>
> 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:
> PMD - ovs-actions configuration
>
> Signed-off-by: Emma Finn <[email protected]>
> Signed-off-by: Kumar Amber <[email protected]>
> Signed-off-by: Sunil Pai G <[email protected]>
> Co-authored-by: Kumar Amber <[email protected]>
> Co-authored-by: Sunil Pai G <[email protected]>
> Acked-by: Harry van Haaren <[email protected]>
>
> ---
<SNIP>
> @@ -879,6 +880,48 @@ odp_actions_impl_set(const char *name)
>
> }
>
> +static void
> +action_impl_set(struct unixctl_conn *conn, int argc OVS_UNUSED,
> + const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED)
> +{
> + struct ds reply = DS_EMPTY_INITIALIZER;
> +
> + int err = odp_actions_impl_set(argv[1]);
> + if (err) {
> + ds_put_format(&reply,
> + "Error: unknown action implementation, %s,
> specified!\n",
On the v7 I asked to remove the trailing \n, any reason why this was not done?
> + argv[1]);
> + unixctl_command_reply_error(conn, ds_cstr(&reply));
> + } else {
> + ds_put_format(&reply, "Action implementation set to %s.\n", argv[1]);
Same as above.
> + unixctl_command_reply(conn, ds_cstr(&reply));
> + }
> +
> + ds_destroy(&reply);
<SNIP>
> +++ b/tests/pmd.at
> @@ -1192,3 +1192,42 @@ ovs-appctl: ovs-vswitchd: server returned an error
>
> OVS_VSWITCHD_STOP
> AT_CLEANUP
> +
> +AT_SETUP([PMD - ovs-actions configuration])
> +OVS_VSWITCHD_START([], [], [], [--dummy-numa 0,0])
> +AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd])
> +
These tests are not PMD related, so I think we should move them to odp.at (and
change the banner)? Ilya any thoughts?
<SNIP>
Everything else looks good to me.
//Eelco
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev