Commit ebfbc46b authored by Flavio Leitner's avatar Flavio Leitner Committed by David S. Miller

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: default avatarFlavio Leitner <fbl@sysclose.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01035bcc
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment