netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: sched: reduce amount of log messages in act_mirred
@ 2020-04-02 22:26 Marcelo Ricardo Leitner
  2020-04-03  1:04 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Marcelo Ricardo Leitner @ 2020-04-02 22:26 UTC (permalink / raw)
  To: netdev; +Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, marcelo.leitner

OVS bridge is usually left down. When using OVS offload, then, it is
quite common to trigger this message. Some cards, for example, can't
offload broadcasts because they can't output to more than 2 ports.
Due to this, act_mirred will try to output to the OVS bridge itself,
which is often down, and floods the log. (yes, the ratelimit is not
enough)

As act_mirred is already incrementing the overlimit counter for each
drop, there is no need to keep flooding the logs here. Lets log it once,
warn the sysadmin, and let the counters do the rest.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
 net/sched/act_mirred.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 83dd82fc9f40ce800b99eae5c0b279dce5b2c1c9..bd1e2c98aaaefc689e52840b9be53ef9de4dd86d 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -245,8 +245,8 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
 	}
 
 	if (unlikely(!(dev->flags & IFF_UP))) {
-		net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
-				       dev->name);
+		pr_notice_once("tc mirred: device %s is down\n",
+			       dev->name);
 		goto out;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-03  4:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 22:26 [PATCH net] net: sched: reduce amount of log messages in act_mirred Marcelo Ricardo Leitner
2020-04-03  1:04 ` David Miller
2020-04-03  1:14   ` Marcelo Ricardo Leitner
2020-04-03  4:43     ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).