Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
MTRIE Optimisations 2
[vpp.git]
/
src
/
vpp
/
api
/
api.c
diff --git
a/src/vpp/api/api.c
b/src/vpp/api/api.c
index
f169d7f
..
09ae8b8
100644
(file)
--- a/
src/vpp/api/api.c
+++ b/
src/vpp/api/api.c
@@
-896,9
+896,10
@@
ip4_reset_fib_t_handler (vl_api_reset_fib_t * mp)
/* *INDENT-OFF* */
pool_foreach (fib_table, im4->fibs,
({
/* *INDENT-OFF* */
pool_foreach (fib_table, im4->fibs,
({
- fib = &fib_table->v4;
vnet_sw_interface_t * si;
vnet_sw_interface_t * si;
+ fib = pool_elt_at_index (im4->v4_fibs, fib_table->ft_index);
+
if (fib->table_id != target_fib_id)
continue;
if (fib->table_id != target_fib_id)
continue;
@@
-964,7
+965,8
@@
ip6_reset_fib_t_handler (vl_api_reset_fib_t * mp)
pool_foreach (fib_table, im6->fibs,
({
vnet_sw_interface_t * si;
pool_foreach (fib_table, im6->fibs,
({
vnet_sw_interface_t * si;
- fib = &(fib_table->v6);
+
+ fib = pool_elt_at_index (im6->v6_fibs, fib_table->ft_index);
if (fib->table_id != target_fib_id)
continue;
if (fib->table_id != target_fib_id)
continue;
@@
-1574,6
+1576,14
@@
vl_api_want_ip4_arp_events_t_handler (vl_api_want_ip4_arp_events_t * mp)
if (mp->enable_disable)
{
if (mp->enable_disable)
{
+ rv = vnet_add_del_ip4_arp_change_event
+ (vnm, arp_change_data_callback,
+ mp->pid, &mp->address /* addr, in net byte order */ ,
+ vpe_resolver_process_node.index,
+ IP4_ARP_EVENT, event - am->arp_events, 1 /* is_add */ );
+
+ if (rv)
+ goto out;
pool_get (am->arp_events, event);
memset (event, 0, sizeof (*event));
pool_get (am->arp_events, event);
memset (event, 0, sizeof (*event));
@@
-1584,12
+1594,6
@@
vl_api_want_ip4_arp_events_t_handler (vl_api_want_ip4_arp_events_t * mp)
event->pid = mp->pid;
if (mp->address == 0)
event->mac_ip = 1;
event->pid = mp->pid;
if (mp->address == 0)
event->mac_ip = 1;
-
- rv = vnet_add_del_ip4_arp_change_event
- (vnm, arp_change_data_callback,
- mp->pid, &mp->address /* addr, in net byte order */ ,
- vpe_resolver_process_node.index,
- IP4_ARP_EVENT, event - am->arp_events, 1 /* is_add */ );
}
else
{
}
else
{
@@
-1599,6
+1603,7
@@
vl_api_want_ip4_arp_events_t_handler (vl_api_want_ip4_arp_events_t * mp)
vpe_resolver_process_node.index,
IP4_ARP_EVENT, ~0 /* pool index */ , 0 /* is_add */ );
}
vpe_resolver_process_node.index,
IP4_ARP_EVENT, ~0 /* pool index */ , 0 /* is_add */ );
}
+out:
REPLY_MACRO (VL_API_WANT_IP4_ARP_EVENTS_REPLY);
}
REPLY_MACRO (VL_API_WANT_IP4_ARP_EVENTS_REPLY);
}