summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2022-07-20 20:00:38 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-07-22 15:19:40 +0200
commitb1524cb94a273c84e1bc79e231835f085a74130d (patch)
treed1d66d9e611a65240163f779c3b9224f54918898
parent9ee6a71b3f48dd1f6642b6101b97696d3a61d4b0 (diff)
downloadopenvswitch-b1524cb94a273c84e1bc79e231835f085a74130d.tar.gz
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.") Acked-by: Emma Finn <emma.finn@intel.com> Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--lib/odp-execute-private.c11
1 files changed, 6 insertions, 5 deletions
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