mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-03 07:31:54 +00:00
BGP: LLGR Staleness optimization dropped.
This brought unnecessary complexity into the decision procedures while the performance aspects weren't worth it. It just saved one ea_list traversal when many others are also done.
This commit is contained in:
parent
adbce76517
commit
2898f8f177
@ -2280,24 +2280,8 @@ bgp_get_neighbor(rte *r)
|
|||||||
static inline int
|
static inline int
|
||||||
rte_stale(rte *r)
|
rte_stale(rte *r)
|
||||||
{
|
{
|
||||||
if (r->pflags & BGP_REF_STALE)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (r->pflags & BGP_REF_NOT_STALE)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* If staleness is unknown, compute and cache it */
|
|
||||||
eattr *a = ea_find(r->attrs, BGP_EA_ID(BA_COMMUNITY));
|
eattr *a = ea_find(r->attrs, BGP_EA_ID(BA_COMMUNITY));
|
||||||
if (a && int_set_contains(a->u.ptr, BGP_COMM_LLGR_STALE))
|
return a && int_set_contains(a->u.ptr, BGP_COMM_LLGR_STALE);
|
||||||
{
|
|
||||||
r->pflags |= BGP_REF_STALE;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
r->pflags |= BGP_REF_NOT_STALE;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -2702,8 +2686,6 @@ bgp_rte_modify_stale(struct rt_export_request *req, const net_addr *n, struct rt
|
|||||||
/* Mark the route as LLGR */
|
/* Mark the route as LLGR */
|
||||||
rte e0 = *r;
|
rte e0 = *r;
|
||||||
bgp_set_attr_ptr(&e0.attrs, BA_COMMUNITY, flags, int_set_add(tmp_linpool, ad, BGP_COMM_LLGR_STALE));
|
bgp_set_attr_ptr(&e0.attrs, BA_COMMUNITY, flags, int_set_add(tmp_linpool, ad, BGP_COMM_LLGR_STALE));
|
||||||
e0.pflags &= ~BGP_REF_NOT_STALE;
|
|
||||||
e0.pflags |= BGP_REF_STALE;
|
|
||||||
|
|
||||||
/* We need to update the route but keep it stale. */
|
/* We need to update the route but keep it stale. */
|
||||||
ASSERT_DIE(irh->stale_set == irh->stale_valid + 1);
|
ASSERT_DIE(irh->stale_set == irh->stale_valid + 1);
|
||||||
|
@ -220,8 +220,6 @@ struct bgp_channel_config {
|
|||||||
|
|
||||||
/* rte->pflags */
|
/* rte->pflags */
|
||||||
#define BGP_REF_SUPPRESSED 0x1 /* Used for deterministic MED comparison */
|
#define BGP_REF_SUPPRESSED 0x1 /* Used for deterministic MED comparison */
|
||||||
#define BGP_REF_STALE 0x2 /* Route is LLGR_STATE */
|
|
||||||
#define BGP_REF_NOT_STALE 0x4 /* Route is NOT LLGR_STATE */
|
|
||||||
|
|
||||||
struct bgp_af_caps {
|
struct bgp_af_caps {
|
||||||
u32 afi;
|
u32 afi;
|
||||||
|
Loading…
Reference in New Issue
Block a user