Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

openvswitch: Warn over-mtu packets only if iface is UP.

It is not unusual to have the bridge port down. Sometimes
it has the old MTU, which is fine since it's not being used.

However, the kernel spams the log with a warning message
when a packet is going to be sent over such port. Fix that
by warning only if the interface is UP.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Flavio Leitner and committed by
David S. Miller
ebfbc46b 01035bcc

+5 -3
+5 -3
net/openvswitch/vport.c
··· 497 497 498 498 if (unlikely(packet_length(skb, vport->dev) > mtu && 499 499 !skb_is_gso(skb))) { 500 - net_warn_ratelimited("%s: dropped over-mtu packet: %d > %d\n", 501 - vport->dev->name, 502 - packet_length(skb, vport->dev), mtu); 503 500 vport->dev->stats.tx_errors++; 501 + if (vport->dev->flags & IFF_UP) 502 + net_warn_ratelimited("%s: dropped over-mtu packet: " 503 + "%d > %d\n", vport->dev->name, 504 + packet_length(skb, vport->dev), 505 + mtu); 504 506 goto drop; 505 507 } 506 508