> -----Original Message-----
> From: Ilya Maximets <[email protected]>
> Sent: Wednesday 20 July 2022 19:01
> To: [email protected]
> Cc: Stokes, Ian <[email protected]>; Eelco Chaudron
> <[email protected]>; Finn, Emma <[email protected]>; Ilya
> Maximets <[email protected]>
> Subject: [PATCH v2] odp-execute: Avoid unnecessary logging for action
> implementations.
>
> There is no need to log if the implementation didn't change.
> Scalar one is default, any change will be logged. And availability is not
> really
> important to log at INFO level. Moving these logs to DBG level to avoid
> littering the log file and confusing users.
> We do the same for miniflow_extract and datapath interface
> implementations.
>
> Additionally text of the log message made more readable and uniform with
> the one used for miniflow_extract.
>
> Fixes: 95e4a35b0a1d ("odp-execute: Add function pointers to odp-execute
> for different action implementations.")
> Signed-off-by: Ilya Maximets <[email protected]>
> ---
>
> Version 2:
> - Dropped the change in test macros, filtering still needed for
> the autovalidator build.
>
> lib/odp-execute-private.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
Changes look good to me.
Acked-by: Emma Finn <[email protected]>
> diff --git a/lib/odp-execute-private.c b/lib/odp-execute-private.c index
> bec49206e..f80ae5a23 100644
> --- a/lib/odp-execute-private.c
> +++ b/lib/odp-execute-private.c
> @@ -97,9 +97,10 @@ odp_execute_action_set(const char *name)
> for (int i = 0; i < ACTION_IMPL_MAX; i++) {
> /* String compare, and set ptrs atomically. */
> if (!strcmp(action_impls[i].name, name)) {
> - active_action_impl_index = i;
> -
> - VLOG_INFO("Action implementation set to %s", name);
> + if (i != active_action_impl_index) {
> + active_action_impl_index = i;
> + VLOG_INFO("Action implementation set to %s", name);
> + }
> return &action_impls[i];
> }
> }
> @@ -142,8 +143,8 @@ odp_execute_action_init(void)
>
> action_impls[i].available = avail;
>
> - VLOG_INFO("Action implementation %s (available: %s)",
> - action_impls[i].name, avail ? "Yes" : "No");
> + VLOG_DBG("Actions implementation '%s' %s available.",
> + action_impls[i].name, avail ? "is" : "is not");
>
> /* The following is a run-time check to make sure a scalar
> * implementation exists for the given ISA implementation. This is to
> --
> 2.34.3
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev