Skip to contentSkip to conversation

net: move "IPv6: sending pkt_too_big to self" to NETDEBUG

PATCH In review Philipp Kern 2 participants 3 messages Jul 28, 2012 – Jul 29, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: move "IPv6: sending pkt_too_big to self" to NETDEBUG

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 (<[email protected]>).

---
 net/ipv6/ip6_output.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6_output.c +1 -1
index 5b2d63e..707002f 100644
@@ -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);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · 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.

[]

net/ipv6/ip6_output.c

Quoted 1 line
net/ipv6/ip6_output.c +0 -0

[]

net/ipv6/ip6_output.c int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, · line 244

Quoted 6 lines
net/ipv6/ip6_output.c +1 -1
@@ -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.

#2 lore raw
Quoted 9 lines · Joe Perches
Quoted 5 lines · 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.

[]

net/ipv6/ip6_output.c

Quoted 1 line
net/ipv6/ip6_output.c +0 -0

[]

Quoted 8 lines

net/ipv6/ip6_output.c int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, · line 244

Quoted 6 lines
net/ipv6/ip6_output.c +1 -1
@@ -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.

Quoted 1 line

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