version 1.1.1.2, 2012/10/09 09:22:29
|
version 1.1.1.3, 2016/11/02 10:09:12
|
Line 636 ospf_ase_calculate_timer (struct thread *t)
|
Line 636 ospf_ase_calculate_timer (struct thread *t)
|
struct route_node *rn; |
struct route_node *rn; |
struct listnode *node; |
struct listnode *node; |
struct ospf_area *area; |
struct ospf_area *area; |
|
struct timeval start_time, stop_time; |
|
|
ospf = THREAD_ARG (t); |
ospf = THREAD_ARG (t); |
ospf->t_ase_calc = NULL; |
ospf->t_ase_calc = NULL; |
Line 644 ospf_ase_calculate_timer (struct thread *t)
|
Line 645 ospf_ase_calculate_timer (struct thread *t)
|
{ |
{ |
ospf->ase_calc = 0; |
ospf->ase_calc = 0; |
|
|
|
quagga_gettime(QUAGGA_CLK_MONOTONIC, &start_time); |
|
|
/* Calculate external route for each AS-external-LSA */ |
/* Calculate external route for each AS-external-LSA */ |
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa) |
LSDB_LOOP (EXTERNAL_LSDB (ospf), rn, lsa) |
ospf_ase_calculate_route (ospf, lsa); |
ospf_ase_calculate_route (ospf, lsa); |
Line 673 ospf_ase_calculate_timer (struct thread *t)
|
Line 676 ospf_ase_calculate_timer (struct thread *t)
|
ospf_route_table_free (ospf->old_external_route); |
ospf_route_table_free (ospf->old_external_route); |
ospf->old_external_route = ospf->new_external_route; |
ospf->old_external_route = ospf->new_external_route; |
ospf->new_external_route = route_table_init (); |
ospf->new_external_route = route_table_init (); |
|
|
|
quagga_gettime(QUAGGA_CLK_MONOTONIC, &stop_time); |
|
|
|
zlog_info ("SPF Processing Time(usecs): External Routes: %lld\n", |
|
(stop_time.tv_sec - start_time.tv_sec)*1000000LL+ |
|
(stop_time.tv_usec - start_time.tv_usec)); |
} |
} |
return 0; |
return 0; |
} |
} |
Line 714 ospf_ase_register_external_lsa (struct ospf_lsa *lsa,
|
Line 723 ospf_ase_register_external_lsa (struct ospf_lsa *lsa,
|
rn = route_node_get (top->external_lsas, (struct prefix *) &p); |
rn = route_node_get (top->external_lsas, (struct prefix *) &p); |
if ((lst = rn->info) == NULL) |
if ((lst = rn->info) == NULL) |
rn->info = lst = list_new(); |
rn->info = lst = list_new(); |
|
else |
|
route_unlock_node (rn); |
|
|
/* We assume that if LSA is deleted from DB |
/* We assume that if LSA is deleted from DB |
is is also deleted from this RT */ |
is is also deleted from this RT */ |
Line 734 ospf_ase_unregister_external_lsa (struct ospf_lsa *lsa
|
Line 745 ospf_ase_unregister_external_lsa (struct ospf_lsa *lsa
|
p.prefixlen = ip_masklen (al->mask); |
p.prefixlen = ip_masklen (al->mask); |
apply_mask_ipv4 (&p); |
apply_mask_ipv4 (&p); |
|
|
rn = route_node_get (top->external_lsas, (struct prefix *) &p); | rn = route_node_lookup (top->external_lsas, (struct prefix *) &p); |
lst = rn->info; | |
|
|
/* XXX lst can be NULL */ | if (rn) { |
if (lst) { | lst = rn->info; |
listnode_delete (lst, lsa); |
listnode_delete (lst, lsa); |
ospf_lsa_unlock (&lsa); /* external_lsas list */ |
ospf_lsa_unlock (&lsa); /* external_lsas list */ |
|
route_unlock_node (rn); |
} |
} |
} |
} |
|
|
Line 812 ospf_ase_incremental_update (struct ospf *ospf, struct
|
Line 823 ospf_ase_incremental_update (struct ospf *ospf, struct
|
{ |
{ |
rn2 = route_node_get (tmp_old, (struct prefix *) &p); |
rn2 = route_node_get (tmp_old, (struct prefix *) &p); |
rn2->info = rn->info; |
rn2->info = rn->info; |
|
route_unlock_node (rn); |
} |
} |
|
|
/* install changes to zebra */ |
/* install changes to zebra */ |
Line 835 ospf_ase_incremental_update (struct ospf *ospf, struct
|
Line 847 ospf_ase_incremental_update (struct ospf *ospf, struct
|
if (rn) |
if (rn) |
{ |
{ |
rn->info = NULL; |
rn->info = NULL; |
route_unlock_node (rn); |
|
route_unlock_node (rn); |
route_unlock_node (rn); |
} |
} |
} |
} |