Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2960809lqz; Wed, 3 Apr 2024 13:44:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyrDBn/yLQNQ1VfScmZxR96PxodaeuqF398Fwf3lWlSgviiu4v70T1MYuarUwC6tqae5DigNqqkGnZAAlKY7C1P4l3wlu5NusbWnVJlg== X-Google-Smtp-Source: AGHT+IHUQu23aWLy21/LW7vhadWjojnfQbLBOWKmd5zrnEZGPt9fGTPDyjrhWspifLuSLuQk+nZ/ X-Received: by 2002:a25:8490:0:b0:dc7:45df:a04c with SMTP id v16-20020a258490000000b00dc745dfa04cmr561917ybk.43.1712177061293; Wed, 03 Apr 2024 13:44:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712177061; cv=pass; d=google.com; s=arc-20160816; b=wlH169K1dxQFn4cxWDDQDKHTISAszYi0Dnji9gofd2+3q0BuH4ZamXnpXitF9WBMwW S60JKip2nCvs2AbbBTUW+mtsLFLX8/ht0x4brTxlT/Lx5IAbj7rndE1dnru4FXhwhdvw rlDQd1/t9nkLygXhOU7A6Eiyv0fZbMmjo21LJPM6KBnTgl95PVM4E2/OgKeTSYDSIi5l zGssZP1UoTaJRuD/GAOROkMIuYjy9lyhFhmDbecr+0mIx9HzW3gUHT2p8H754Hm5q1lv 9OAGzOF5BWMCgFJYpznGrwNCcD3GsVuz7r5qDuvB+a9rwAx5aYoTV6A2p4u00rBUmhhW YxhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=Zfuvw0W+iQedgh/nhI9jWmL6/fJ/kHcimIwYgfyo7fc=; fh=NrLdBeA12N5UcX4/0zYhGEd1FJ4mCC2vBETcCeddPsc=; b=kkvIU685PmhvE0em4nMhk3T7/rubNPe6/NlRHRCE/YcNpYAHWsvvi3vklYgtzuUZe0 zsp1MGZjmpLJzBjJR7FBzXSm4ErgD+YnTgZ9BxDO33Hm1JLrpAOTipsN58OsIQ1rkR12 QGj6yv9wbL5fVTtHqg2bnJ7mAx9/dHScY+1gdiH5EOnInBff5rDb25I2Tr0vvBlayObX sN0pa5i8MR5H1QBtt/LiSQNm4yJVJvrnp42ETkOgVYqRSRFgo20/0GdnwQ3oosbVzPVg 165JaMvchfX9IM7kQa0vPK4jH6bZCOM9cQQ64rfiqe9XjQ+wFsSokma2u6E8yQKKWAon Ihpg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ovn.org); spf=pass (google.com: domain of linux-kernel+bounces-130589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130589-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n3-20020ac85a03000000b004341d9b43a5si5056655qta.703.2024.04.03.13.44.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:44:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ovn.org); spf=pass (google.com: domain of linux-kernel+bounces-130589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130589-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EBDDC1C25C3C for ; Wed, 3 Apr 2024 20:44:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 634DC156897; Wed, 3 Apr 2024 20:37:35 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51EF0156880; Wed, 3 Apr 2024 20:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712176654; cv=none; b=Zw9XrSk5iITGZo6kQHInI8m0tXc9bk3xPvmpnU0jYwF3QS/HdBk1wJ3wJG52lNWWeb1jgmz+j61eCnt6+/DOKiiDJhu4rq4NltJQR2n4uzpbIfzQ82ONILOeE2pOq+x0JF/+jinjk/G08S23DvW53rJMv5fBctAZ8Mkor1AzVbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712176654; c=relaxed/simple; bh=X6bTWWIJgpGy4SkYcFLNiquERMtuJ6e3t7TzjT5IO4s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mDcGFo+DA96RtnKk+kqBR30Azz8St2rXgQZz8U+cmiQr130J5pWC5tyoGpXSzvc/Qple/gdS/eQgt5YgTczpXZSGDa3AWed2EQyLcv72n6rYmc7FY25EHDzsvBSIuJX0B/rqdY4xm5fxuWdXi+ni3BIQH+Nk8FNv/6L8oLSGIdg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org; spf=pass smtp.mailfrom=ovn.org; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ovn.org Received: by mail.gandi.net (Postfix) with ESMTPSA id BB52160003; Wed, 3 Apr 2024 20:37:22 +0000 (UTC) From: Ilya Maximets To: netdev@vger.kernel.org Cc: Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yi-Hung Wei , dev@openvswitch.org, linux-kernel@vger.kernel.org, Ilya Maximets Subject: [PATCH net] net: openvswitch: fix unwanted error log on timeout policy probing Date: Wed, 3 Apr 2024 22:38:01 +0200 Message-ID: <20240403203803.2137962-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: i.maximets@ovn.org 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: 06bd2bdf19d2 ("openvswitch: Add timeout support to ct action") Signed-off-by: Ilya Maximets --- net/openvswitch/conntrack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 3019a4406ca4..74b63cdb5992 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1380,8 +1380,9 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr, if (ct_info.timeout[0]) { if (nf_ct_set_timeout(net, ct_info.ct, family, key->ip.proto, ct_info.timeout)) - pr_info_ratelimited("Failed to associated timeout " - "policy `%s'\n", ct_info.timeout); + OVS_NLERR(log, + "Failed to associated timeout policy '%s'", + ct_info.timeout); else ct_info.nf_ct_timeout = rcu_dereference( nf_ct_timeout_find(ct_info.ct)->timeout); -- 2.44.0