On Tue, Jun 25, 2019 at 10:15 AM Florian Westphal <f...@strlen.de> wrote: > > John Hurley <john.hur...@netronome.com> wrote: > > Hi Eyal, > > The value of 4 is basically a revert to what it was on older kernels > > when TC had a TTL value in the skb: > > https://elixir.bootlin.com/linux/v3.19.8/source/include/uapi/linux/pkt_cls.h#L97 > > IIRC this TTL value was not used ever.
It was used to carry out this looping check on ingress redirects: https://elixir.bootlin.com/linux/v3.19.8/source/net/core/dev.c#L3468 It appears this was removed/unused after changes in 4.2 > > > I also found with my testing that a value greater than 4 was sailing > > close to the edge. > > With a larger value (on my system anyway), I could still trigger a > > stack overflow here. > > I'm not sure on the history of why a value of 4 was selected here but > > it seems to fall into line with my findings. > > Is there a hard requirement for >4 recursive calls here? > > One alternative would be to (instead of dropping the skb), to > decrement the ttl and use netif_rx() instead. Yes, this seems like something worth investigating. Thanks