From: Chris J Arges <carges@cloudflare.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>
Cc: kernel-team@cloudflare.com, Chris J Arges <carges@cloudflare.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next] net: Add net_cookie to Dead loop messages
Date: Fri, 3 Apr 2026 17:13:39 -0500 [thread overview]
Message-ID: <20260403221352.186383-1-carges@cloudflare.com> (raw)
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.
Signed-off-by: Chris J Arges <carges@cloudflare.com>
---
net/core/dev.c | 4 ++--
net/ipv4/ip_tunnel_core.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 831129f2a69b..a9718fe9d12c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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;
}
}
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 5683c328990f..a41bcf7ddc06 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -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);
--
2.43.0
reply other threads:[~2026-04-03 22:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260403221352.186383-1-carges@cloudflare.com \
--to=carges@cloudflare.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@cloudflare.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox