netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: move "IPv6: sending pkt_too_big to self" to NETDEBUG
@ 2012-07-28 15:06 Philipp Kern
  2012-07-28 17:29 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Kern @ 2012-07-28 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev, ak, Philipp Kern

ip6_xmit checks if the outgoing packet is larger than the path MTU and
emits ICMPv6 packet too big locally if this is the case. Logging this,
even at KERN_DEBUG, confuses users. It is also not actually helpful for
debugging, given that there is no reference to the connection that
triggered this event.

Hence move this message to LIMIT_NETDEBUG, as suggested by Andi Kleen
back in 2001 (<20010215231715.26269@colin.muc.de>).

Signed-off-by: Philipp Kern <pkern@debian.org>
---
 net/ipv6/ip6_output.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 5b2d63e..707002f 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -241,7 +241,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
 			       dst->dev, dst_output);
 	}
 
-	net_dbg_ratelimited("IPv6: sending pkt_too_big to self\n");
+	LIMIT_NETDEBUG("IPv6: sending pkt_too_big to self\n");
 	skb->dev = dst->dev;
 	icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
 	IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS);
-- 
1.7.10.4

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

* Re: [PATCH] net: move "IPv6: sending pkt_too_big to self" to NETDEBUG
  2012-07-28 15:06 [PATCH] net: move "IPv6: sending pkt_too_big to self" to NETDEBUG Philipp Kern
@ 2012-07-28 17:29 ` Joe Perches
  2012-07-29 12:24   ` Philipp Kern
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2012-07-28 17:29 UTC (permalink / raw)
  To: Philipp Kern
  Cc: linux-kernel, David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev, ak

On Sat, 2012-07-28 at 17:06 +0200, Philipp Kern wrote:
> ip6_xmit checks if the outgoing packet is larger than the path MTU and
> emits ICMPv6 packet too big locally if this is the case. Logging this,
> even at KERN_DEBUG, confuses users. It is also not actually helpful for
> debugging, given that there is no reference to the connection that
> triggered this event.
[]
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
[]
> @@ -241,7 +241,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
>  			       dst->dev, dst_output);
>  	}
>  
> -	net_dbg_ratelimited("IPv6: sending pkt_too_big to self\n");
> +	LIMIT_NETDEBUG("IPv6: sending pkt_too_big to self\n");

LIMIT_NETDEBUG doesn't include a logging level.
Add a KERN_DEBUG prefix or another KERN_<LEVEL>.

Maybe it'd be better to add the context too.

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

* Re: [PATCH] net: move "IPv6: sending pkt_too_big to self" to NETDEBUG
  2012-07-28 17:29 ` Joe Perches
@ 2012-07-29 12:24   ` Philipp Kern
  0 siblings, 0 replies; 3+ messages in thread
From: Philipp Kern @ 2012-07-29 12:24 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, netdev, ak

[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]

On Sat, Jul 28, 2012 at 10:29:20AM -0700, Joe Perches wrote:
> On Sat, 2012-07-28 at 17:06 +0200, Philipp Kern wrote:
> > ip6_xmit checks if the outgoing packet is larger than the path MTU and
> > emits ICMPv6 packet too big locally if this is the case. Logging this,
> > even at KERN_DEBUG, confuses users. It is also not actually helpful for
> > debugging, given that there is no reference to the connection that
> > triggered this event.
> []
> > diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> []
> > @@ -241,7 +241,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
> >  			       dst->dev, dst_output);
> >  	}
> >  
> > -	net_dbg_ratelimited("IPv6: sending pkt_too_big to self\n");
> > +	LIMIT_NETDEBUG("IPv6: sending pkt_too_big to self\n");
> LIMIT_NETDEBUG doesn't include a logging level.
> Add a KERN_DEBUG prefix or another KERN_<LEVEL>.

True, sorry, and thanks. That got lost with the change to net_dbg_ratelimited.

> Maybe it'd be better to add the context too.

Right. What kind of context do you want to see? Would saddr, daddr and dst_mtu
be enough? What about skb->len / local_df / skb_is_gso (which are in the
condition of the preceding if)?

Kind regards
Philipp Kern

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 588 bytes --]

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

end of thread, other threads:[~2012-07-29 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28 15:06 [PATCH] net: move "IPv6: sending pkt_too_big to self" to NETDEBUG Philipp Kern
2012-07-28 17:29 ` Joe Perches
2012-07-29 12:24   ` Philipp Kern

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).