aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj.c
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-19 02:36:19 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-19 12:21:00 +0000
commitd79a43c7f43e8b99d6eb019d69a3083c545007f1 (patch)
treee63cbb80b14fa0c1ba2c884e070125d6b76627bc /src/vnet/adj/adj.c
parentd91d14095b8ac0d3151fd8f6b03277d447029814 (diff)
Adjacency Delegate updates
- Register new type (for use from puglins) - Memory for delegate is provided by delegate provider Change-Id: I5ece86b1fe84e3028a5c853871476c4ba015b2eb Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj.c')
-rw-r--r--src/vnet/adj/adj.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index e1d7821fd39..386070ed3f8 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -129,18 +129,13 @@ format_ip_adjacency (u8 * s, va_list * args)
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 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);
@@ -162,7 +157,7 @@ adj_last_lock_gone (ip_adjacency_t *adj)
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);
@@ -430,24 +425,7 @@ adj_get_sw_if_index (adj_index_t ai)
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));
}
/**