Task #1974
closedOnly multiply hyperbolic costs before registering
100%
Description
Overview:¶
Currently, the route cost of all nexthops are multiplied and registered as an integer in NFD.
e.g. Nexthop{name: /a, faceId: 1, cost: 12.34} is registered as FibEntry{name: /a, faceId: 1, cost: 1234}
Instead, only hyperbolic costs should be multiplied before being registered. Link state costs should be registered with their originally computed costs.
Proposal:¶
Add a flag to the NextHop class that marks the nexthop as hyperbolic.
When getRouteCostAsAdjustedInteger() is called, the method checks if the nexthop is hyperbolic and if so, returns static_cast<uint64_t>(m_routeCost*HYPERBOLIC_COST_ADJUSTMENT_FACTOR);
If the nexthop was calculated by link state, the method returns static_cast<uint64_t>(m_routeCost);
HYPERBOLIC_COST_ADJUSTMENT_FACTOR
was previously assigned a value of 100, but a cost of 1000 had been suggested and should be changed for this revision.
Updated by Vince Lehman over 10 years ago
- Status changed from In Progress to Code review
- % Done changed from 0 to 90
Updated by Vince Lehman about 10 years ago
- Status changed from Code review to Closed
- % Done changed from 90 to 100