aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_api.c
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-05-03 10:03:50 +0200
committerOle Trøan <otroan@employees.org>2018-05-14 10:20:24 +0000
commit5257452d38a3441b5cc22c010c3c586523919433 (patch)
treebed9790d8d7f20f73f9b38a68873e079e5525194 /src/vnet/ip/ip_api.c
parent17e5cfbe8d9b1f47b18eb1a43976fe322e3987a2 (diff)
Rework CP and DP communication in IPv6 RD (VPP-1256)
Replace binary API communication between CP and DP with direct communication using function calls and callbacks. Change-Id: Ib54f09062217c028e5ee0e96ae2449cf7e9224e3 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r--src/vnet/ip/ip_api.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 3711c40343b..ea71375f99d 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -1049,7 +1049,7 @@ ip4_add_del_route_t_handler (vl_api_ip_add_del_route_t * mp)
label_stack));
}
-static int
+int
ip6_add_del_route_t_handler (vl_api_ip_add_del_route_t * mp)
{
fib_mpls_label_t *label_stack = NULL;
@@ -2325,6 +2325,10 @@ wc_arp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
ra_report_t *ra_events = event_data;
for (i = 0; i < vec_len (ra_events); i++)
{
+ ip6_neighbor_public_main_t *npm = &ip6_neighbor_public_main;
+ call_ip6_neighbor_callbacks (&ra_events[i],
+ npm->ra_report_functions);
+
vpe_client_registration_t *reg;
/* *INDENT-OFF* */
pool_foreach(reg, vpe_api_main.ip6_ra_events_registrations,
@@ -2614,8 +2618,6 @@ vl_api_want_ip6_ra_events_t_handler (vl_api_want_ip6_ra_events_t * mp)
rp = pool_elt_at_index (am->ip6_ra_events_registrations, p[0]);
pool_put (am->ip6_ra_events_registrations, rp);
hash_unset (am->ip6_ra_events_registration_hash, mp->client_index);
- if (pool_elts (am->ip6_ra_events_registrations) == 0)
- ra_set_publisher_node (~0, REPORT_MAX);
goto reply;
}
}
@@ -2630,7 +2632,6 @@ vl_api_want_ip6_ra_events_t_handler (vl_api_want_ip6_ra_events_t * mp)
rp->client_pid = ntohl (mp->pid);
hash_set (am->ip6_ra_events_registration_hash, rp->client_index,
rp - am->ip6_ra_events_registrations);
- ra_set_publisher_node (wc_arp_process_node.index, RA_REPORT);
reply:
REPLY_MACRO (VL_API_WANT_IP6_RA_EVENTS_REPLY);
@@ -3014,6 +3015,8 @@ ip_api_hookup (vlib_main_t * vm)
*/
setup_message_id_table (am);
+ ra_set_publisher_node (wc_arp_process_node.index, RA_REPORT);
+
return 0;
}