Skip to contentSkip to conversation

net: Add net_cookie to Dead loop messages

PATCH Superseded Chris J Arges 2 participants 2 messages Apr 3 – Apr 8

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: Add net_cookie to Dead loop messages

Network devices can have the same name within different network namespaces. To help distinguish these devices, add the net_cookie value which can be used to identify the netns.

---
 net/core/dev.c            | 4 ++--
 net/ipv4/ip_tunnel_core.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
net/core/dev.c +2 -2
index 831129f2a69b..a9718fe9d12c 100644
@@ -4875,8 +4875,8 @@ int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev)
 			 * unfortunately
 			 */
 recursion_alert:
-			net_crit_ratelimited("Dead loop on virtual device %s, fix it urgently!\n",
-					     dev->name);
+			net_crit_ratelimited("Dead loop on virtual device %s (net %llu), fix it urgently!\n",
+					     dev->name, dev_net(dev)->net_cookie);
 			rc = -ENETDOWN;
 		}
 	}
net/ipv4/ip_tunnel_core.c +2 -2
index 5683c328990f..a41bcf7ddc06 100644
@@ -60,8 +60,8 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
 
 	if (unlikely(dev_recursion_level() > IP_TUNNEL_RECURSION_LIMIT)) {
 		if (dev) {
-			net_crit_ratelimited("Dead loop on virtual device %s, fix it urgently!\n",
-					     dev->name);
+			net_crit_ratelimited("Dead loop on virtual device %s (net %llu), fix it urgently!\n",
+					     dev->name, dev_net(dev)->net_cookie);
 			DEV_STATS_INC(dev, tx_errors);
 		}
 		ip_rt_put(rt);
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 3 lines · On Fri, 3 Apr 2026 17:13:39 -0500 Chris J Arges wrote:

Network devices can have the same name within different network namespaces. To help distinguish these devices, add the net_cookie value which can be used to identify the netns.

Doesn't apply, please respin?

Applying: net: Add net_cookie to Dead loop messages
Using index info to reconstruct a base tree...
M net/core/dev.c
M net/ipv4/ip_tunnel_core.c
Falling back to patching base and 3-way merge...
Auto-merging net/core/dev.c
CONFLICT (content): Merge conflict in net/core/dev.c
Auto-merging net/ipv4/ip_tunnel_core.c
Recorded preimage for 'net/core/dev.c'
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false" Patch failed at 0001 net: Add net_cookie to Dead loop messages

Signature · 1 line
pw-bot: cr