All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] openvswitch: Warn over-mtu packets only if iface is UP.
@ 2021-03-16 20:14 Flavio Leitner
  2021-03-16 23:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Flavio Leitner @ 2021-03-16 20:14 UTC (permalink / raw)
  To: netdev; +Cc: Eelco Chaudron, Pravin B Shelar

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>
---
 net/openvswitch/vport.c | 8 +++++---
 1 file 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;
 	}
 
-- 
2.29.2


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

* Re: [PATCH net-next] openvswitch: Warn over-mtu packets only if iface is UP.
  2021-03-16 20:14 [PATCH net-next] openvswitch: Warn over-mtu packets only if iface is UP Flavio Leitner
@ 2021-03-16 23:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-16 23:40 UTC (permalink / raw)
  To: Flavio Leitner; +Cc: netdev, echaudro, pshelar

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Tue, 16 Mar 2021 17:14:27 -0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] openvswitch: Warn over-mtu packets only if iface is UP.
    https://git.kernel.org/netdev/net-next/c/ebfbc46b35cb

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-03-16 23:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 20:14 [PATCH net-next] openvswitch: Warn over-mtu packets only if iface is UP Flavio Leitner
2021-03-16 23:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.