Thread (62 messages) 62 messages, 13 authors, 2005-01-27

Re: [PATCH]: was Re: LLTX and netif_stop_queue

From: Lennert Buytenhek <hidden>
Date: 2005-01-26 13:25:12

On Tue, Jan 25, 2005 at 10:27:05PM -0800, David S. Miller wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help