if (fiaf & FORMAT_IP_ADJACENCY_DETAIL)
{
- adj_delegate_type_t adt;
- adj_delegate_t *aed;
vlib_counter_t counts;
vlib_get_combined_counter(&adjacency_counters, adj_index, &counts);
- s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
- s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
+ s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
+ s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
s = format(s, "\n delegates:\n ");
- FOR_EACH_ADJ_DELEGATE(adj, adt, aed,
- {
- s = format(s, " %U\n", format_adj_delegate, aed);
- });
+ adj_delegate_format(s, adj);
- s = format(s, "\n children:\n ");
- s = fib_node_children_format(adj->ia_node.fn_children, s);
+ s = format(s, "\n children:");
+ if (fib_node_list_get_size(adj->ia_node.fn_children))
+ {
+ s = format(s, "\n ");
+ s = fib_node_children_format(adj->ia_node.fn_children, s);
+ }
}
return s;
ASSERT(0 == fib_node_list_get_size(adj->ia_node.fn_children));
ADJ_DBG(adj, "last-lock-gone");
- adj_delegate_vft_lock_gone(adj);
+ adj_delegate_adj_deleted(adj);
vlib_worker_thread_barrier_sync (vm);
adj = adj_get(ai);
- vnet_rewrite_update_mtu (vnet_get_main(),
+ vnet_rewrite_update_mtu (vnet_get_main(), adj->ia_link,
&adj->rewrite_header);
return (ADJ_WALK_RC_CONTINUE);
}
static void
-adj_sw_mtu_update (vnet_main_t * vnm,
- u32 sw_if_index,
- void *ctx)
+adj_mtu_update (vnet_main_t * vnm, u32 sw_if_index, u32 flags)
{
- /*
- * Walk all the adjacencies on the interface to update the cached MTU
- */
- adj_walk (sw_if_index, adj_mtu_update_walk_cb, NULL);
+ adj_walk (sw_if_index, adj_mtu_update_walk_cb, NULL);
}
-void
-adj_mtu_update (u32 hw_if_index)
-{
- /*
- * Walk all the SW interfaces on the HW interface to update the cached MTU
- */
- vnet_hw_interface_walk_sw(vnet_get_main(),
- hw_if_index,
- adj_sw_mtu_update,
- NULL);
-}
+VNET_SW_INTERFACE_MTU_CHANGE_FUNCTION(adj_mtu_update);
/**
* @brief Walk the Adjacencies on a given interface
int
adj_is_up (adj_index_t ai)
{
- const adj_delegate_t *aed;
-
- aed = adj_delegate_get(adj_get(ai), ADJ_DELEGATE_BFD);
-
- if (NULL == aed)
- {
- /*
- * no BFD tracking - resolved
- */
- return (!0);
- }
- else
- {
- /*
- * defer to the state of the BFD tracking
- */
- return (ADJ_BFD_STATE_UP == aed->ad_bfd_state);
- }
+ return (adj_bfd_is_up(ai));
}
/**