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

From: Jakub Kicinski <[email-masked]>
Date: Wed, 1 Apr 2026 17:38:43 -0700

On Tue, 31 Mar 2026 15:09:33 -0500 Chris Arges wrote:
> 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.

Last device meaning limit of 5 would have worked for you?
I don't think there was any hard math behind the 4 so ++
on the limit may be simplest, but I defer to Paolo..