Skip to content

Commit 4539f91

Browse files
igsilyakuba-moo
authored andcommitted
net: openvswitch: fix unwanted error log on timeout policy probing
On startup, ovs-vswitchd probes different datapath features including support for timeout policies. While probing, it tries to execute certain operations with OVS_PACKET_ATTR_PROBE or OVS_FLOW_ATTR_PROBE attributes set. These attributes tell the openvswitch module to not log any errors when they occur as it is expected that some of the probes will fail. For some reason, setting the timeout policy ignores the PROBE attribute and logs a failure anyway. This is causing the following kernel log on each re-start of ovs-vswitchd: kernel: Failed to associated timeout policy `ovs_test_tp' Fix that by using the same logging macro that all other messages are using. The message will still be printed at info level when needed and will be rate limited, but with a net rate limiter instead of generic printk one. The nf_ct_set_timeout() itself will still print some info messages, but at least this change makes logging in openvswitch module more consistent. Fixes: 06bd2bd ("openvswitch: Add timeout support to ct action") Signed-off-by: Ilya Maximets <[email protected]> Acked-by: Eelco Chaudron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c88b9b4 commit 4539f91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/openvswitch/conntrack.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,8 +1380,9 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,
13801380
if (ct_info.timeout[0]) {
13811381
if (nf_ct_set_timeout(net, ct_info.ct, family, key->ip.proto,
13821382
ct_info.timeout))
1383-
pr_info_ratelimited("Failed to associated timeout "
1384-
"policy `%s'\n", ct_info.timeout);
1383+
OVS_NLERR(log,
1384+
"Failed to associated timeout policy '%s'",
1385+
ct_info.timeout);
13851386
else
13861387
ct_info.nf_ct_timeout = rcu_dereference(
13871388
nf_ct_timeout_find(ct_info.ct)->timeout);

0 commit comments

Comments
 (0)