[openib-general] Re: [PATCH]: was Re: LLTX and netif_stop_queue
Lennert Buytenhek
buytenh at wantstofly.org
Wed Jan 26 05:25:12 PST 2005
On Tue, Jan 25, 2005 at 10:27:05PM -0800, David S. Miller wrote:
> > If multiple CPUs can call into the tunneling drivers without taking
> > any locks, we'd need some extra locking in there, or just do what
> > Alexey describes and keep track of recursion in the skb.
>
> Another idea is that, just like how loopback made it's statistics
> per-cpu for LLTX support, this recursion variable could be per-cpu
> as well.
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?
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.
--L
More information about the general
mailing list