aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@sysclose.org>2021-03-16 17:14:27 -0300
committerDavid S. Miller <davem@davemloft.net>2021-03-16 16:28:30 -0700
commitebfbc46b35cb70b9fbd88f376d7a33b79f60adff (patch)
tree7149adcd9fbe0f317c57af926c7d1109a67bbd8b /net/openvswitch
parentRevert "net: socket: use BIT() for MSG_*" (diff)
downloadlinux-dev-ebfbc46b35cb70b9fbd88f376d7a33b79f60adff.tar.xz
linux-dev-ebfbc46b35cb70b9fbd88f376d7a33b79f60adff.zip
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>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/vport.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 4ed7e52c7012..88deb5b41429 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -497,10 +497,12 @@ void ovs_vport_send(struct vport *vport, struct sk_buff *skb, u8 mac_proto)
if (unlikely(packet_length(skb, vport->dev) > mtu &&
!skb_is_gso(skb))) {
- net_warn_ratelimited("%s: dropped over-mtu packet: %d > %d\n",
- vport->dev->name,
- packet_length(skb, vport->dev), mtu);
vport->dev->stats.tx_errors++;
+ if (vport->dev->flags & IFF_UP)
+ net_warn_ratelimited("%s: dropped over-mtu packet: "
+ "%d > %d\n", vport->dev->name,
+ packet_length(skb, vport->dev),
+ mtu);
goto drop;
}