[Xorp-hackers] heavy CPU use for xorp_fea on startup
greearb at candelatech.com
Tue Mar 4 18:34:33 PST 2008
Pavlin Radoslavov wrote:
>>> In your implementation you need to be very careful that you capture
>>> all places inside IfTree that are related to the new pif_index to
>>> vif mapping.
>> I was thinking on the way home: Maybe just map if-index to if-name. If
>> the mapping
>> lookup fails, do a long slow linear lookup and if the object is found,
>> add it to the if-index -> map.
>> If it succeeds, then lookup the vif by way of the existing hash,
>> double-check the if-index is
>> correct (if not, do a slow lookup).
> I think this adds lots of complexity.
> Just a simple if-index to vif-name-pointer should be sufficient.
> Off the top of my head, you need to consider the following places
> inside IfTree that will affect the mapping:
Maybe I'm too paranoid..but any code can get an if, and then muck with it's
vifs. The mapping is external to the if and vif objects, so it would be
to make sure no one can ever screw up a listing.
Also, an ifname can change while the ifindex remains the same, or
a new interface with the same name but a different ifindex can be
Anyway, I'll make a stab at it and then let you review what I come up
Also, any comments on the socket-per-interface patch? I'd like to work
getting that accepted, as my cvs diff is getting quite large...
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-hackers