Re: [PATCH]: was Re: LLTX and netif_stop_queue
From: "David S. Miller" <davem@davemloft.net>
Date: 2005-01-27 06:32:47
From: "David S. Miller" <davem@davemloft.net>
Date: 2005-01-27 06:32:47
On Wed, 26 Jan 2005 14:25:12 +0100 Lennert Buytenhek [off-list ref] wrote:
I've thought about this a bit, and the only sane way of doing recursion detection that doesn't involve 'struct net_device' would be to keep track of the recursion depth (perhaps per-CPU as you suggest) and tossing the packet when it exceeds some random value, right?
Yes, that's the idea.
To reproduce the current behaviour more closely you'd have to keep a small per-CPU array of 'struct net_device *' pointers as a kind of recursion stack, and toss the packet when you hit a net_device that's already on the list. But that seems like slight overkill.
Indeed.