Subject: [REGRESSION] net: add xmit recursion limit to tunnel xmit functions

From: Chris Arges <[email-masked]>
Date: Tue, 31 Mar 2026 15:09:33 -0500

Hello,

Commit 6f1a9140ecda ("net: add xmit recursion limit to tunnel xmit functions")
introduces a regression in our systems using legitimate multi-level tunnel
encapsulation stacks. Our testing was with stable 6.12.y and 6.18.y where this
patch was backported.

One of the usecases we have are packets being sent to a GRE device, then
MPLS/LWT route, then IPIP device, then SIT/FOU device. What we observed is that
packets are getting dropped at the last device and we get the message "Dead
loop on virtual device" sent from the iptunnel_xmit function.

I'm looking for some approaches to retain the mitigation while still having a
recursion limit. One idea is to just increase the limit. Happy to provide
additional testing and debugging.

Thanks,
--chris