Fix dpdk/ldradix fib lookup algorithm preference calculation.
The current preference number were copied from IPv4 code, assuming 500k routes to be the full-view. Adjust with the current reality (100k full-view). Reported by: Marek Zarychta <zarychtam at plan-b.pwste.edu.pl> MFC after: 3 days
This commit is contained in:
parent
748be78e60
commit
d5be41beb7
@ -129,8 +129,8 @@ rte6_get_pref(const struct rib_rtable_info *rinfo)
|
||||
return (1);
|
||||
else if (rinfo->num_prefixes < 1000)
|
||||
return (rinfo->num_prefixes / 10);
|
||||
else if (rinfo->num_prefixes < 500000)
|
||||
return (100 + rinfo->num_prefixes / 3334);
|
||||
else if (rinfo->num_prefixes < 100000)
|
||||
return (100 + rinfo->num_prefixes / 667);
|
||||
else
|
||||
return (250);
|
||||
}
|
||||
|
@ -118,8 +118,8 @@ lradix6_get_pref(const struct rib_rtable_info *rinfo)
|
||||
|
||||
if (rinfo->num_prefixes < 10)
|
||||
return (255);
|
||||
else if (rinfo->num_prefixes < 100000)
|
||||
return (255 - rinfo->num_prefixes / 394);
|
||||
else if (rinfo->num_prefixes < 10000)
|
||||
return (255 - rinfo->num_prefixes / 40);
|
||||
else
|
||||
return (1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user