On Fri, 2006-30-06 at 19:42 +0200, Patrick McHardy wrote: > jamal wrote:
> > Thomas makes the claim, this can be achieved only by using an ifindex. > > And i havent been able to see how. I have a small performance problem if > > i just use ifindex. Using ifindex will eventually save 32 bits on the > > 64 bit machines. I posed the question as to which was more beneficial > > as a solution that hasnt been addressed. > > Are we still talking about this? Its easy: a pointer without taking > a reference can become stale, I should have been clear: reference gets taken in mirred. > with ifindex you do the lookup right > when using it, so you either get an result or you don't. My arguement was: dev get by index per device will involve a a) lookup + b) incrementing the refcount. if i use the dev pointer in that path then it becomes only #b in both cases, you need to increment the counter and then somewhere decrement it. cheers, jamal > It also > saves atomic operations for anyone _not_ using it, which is that > vast majority of users. So the patch clearly makes sense to me. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html