Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
IP-neighbor: add and delete internal API
[vpp.git]
/
src
/
vnet
/
ip
/
ip6_neighbor.c
diff --git
a/src/vnet/ip/ip6_neighbor.c
b/src/vnet/ip/ip6_neighbor.c
index
1093009
..
8466ba7
100755
(executable)
--- a/
src/vnet/ip/ip6_neighbor.c
+++ b/
src/vnet/ip/ip6_neighbor.c
@@
-25,6
+25,7
@@
#include <vnet/fib/ip6_fib.h>
#include <vnet/mfib/ip6_mfib.h>
#include <vnet/ip/ip6_ll_table.h>
#include <vnet/fib/ip6_fib.h>
#include <vnet/mfib/ip6_mfib.h>
#include <vnet/ip/ip6_ll_table.h>
+#include <vnet/l2/l2_input.h>
/**
* @file
/**
* @file
@@
-413,8
+414,9
@@
static void ip6_neighbor_set_unset_rpc_callback
static void set_unset_ip6_neighbor_rpc
(vlib_main_t * vm,
u32 sw_if_index,
static void set_unset_ip6_neighbor_rpc
(vlib_main_t * vm,
u32 sw_if_index,
- ip6_address_t * a, u8 * link_layer_address, int is_add, int is_static,
- int is_no_fib_entry)
+ const ip6_address_t * a,
+ const u8 * link_layer_address,
+ int is_add, int is_static, int is_no_fib_entry)
{
ip6_neighbor_set_unset_rpc_args_t args;
void vl_api_rpc_call_main_thread (void *fp, u8 * data, u32 data_length);
{
ip6_neighbor_set_unset_rpc_args_t args;
void vl_api_rpc_call_main_thread (void *fp, u8 * data, u32 data_length);
@@
-771,8
+773,8
@@
force_reuse_neighbor_entry (void)
int
vnet_set_ip6_ethernet_neighbor (vlib_main_t * vm,
u32 sw_if_index,
int
vnet_set_ip6_ethernet_neighbor (vlib_main_t * vm,
u32 sw_if_index,
- ip6_address_t * a,
- u8 * link_layer_address,
+
const
ip6_address_t * a,
+
const
u8 * link_layer_address,
uword n_bytes_link_layer_address,
int is_static, int is_no_fib_entry)
{
uword n_bytes_link_layer_address,
int is_static, int is_no_fib_entry)
{
@@
-894,7
+896,7
@@
check_customers:
pool_put (nm->pending_resolutions, pr);
}
pool_put (nm->pending_resolutions, pr);
}
- mhash_unset (&nm->pending_resolutions_by_address, a, 0);
+ mhash_unset (&nm->pending_resolutions_by_address,
(void *)
a, 0);
}
/* Customer(s) requesting ND event for this address? */
}
/* Customer(s) requesting ND event for this address? */
@@
-913,7
+915,8
@@
check_customers:
/* Call the user's data callback, return 1 to suppress dup events */
if (fp)
rv =
/* Call the user's data callback, return 1 to suppress dup events */
if (fp)
rv =
- (*fp) (mc->data, link_layer_address, sw_if_index, &ip6a_zero);
+ (*fp) (mc->data, (u8 *) link_layer_address, sw_if_index,
+ &ip6a_zero);
/*
* Signal the resolver process, as long as the user
* says they want to be notified
/*
* Signal the resolver process, as long as the user
* says they want to be notified
@@
-930,10
+933,7
@@
check_customers:
int
vnet_unset_ip6_ethernet_neighbor (vlib_main_t * vm,
int
vnet_unset_ip6_ethernet_neighbor (vlib_main_t * vm,
- u32 sw_if_index,
- ip6_address_t * a,
- u8 * link_layer_address,
- uword n_bytes_link_layer_address)
+ u32 sw_if_index, const ip6_address_t * a)
{
ip6_neighbor_main_t *nm = &ip6_neighbor_main;
ip6_neighbor_key_t k;
{
ip6_neighbor_main_t *nm = &ip6_neighbor_main;
ip6_neighbor_key_t k;
@@
-943,7
+943,7
@@
vnet_unset_ip6_ethernet_neighbor (vlib_main_t * vm,
if (vlib_get_thread_index ())
{
if (vlib_get_thread_index ())
{
- set_unset_ip6_neighbor_rpc (vm, sw_if_index, a,
link_layer_address
,
+ set_unset_ip6_neighbor_rpc (vm, sw_if_index, a,
NULL
,
0 /* unset */ , 0, 0);
return 0;
}
0 /* unset */ , 0, 0);
return 0;
}
@@
-982,8
+982,7
@@
static void ip6_neighbor_set_unset_rpc_callback
a->link_layer_address, 6, a->is_static,
a->is_no_fib_entry);
else
a->link_layer_address, 6, a->is_static,
a->is_no_fib_entry);
else
- vnet_unset_ip6_ethernet_neighbor (vm, a->sw_if_index, &a->addr,
- a->link_layer_address, 6);
+ vnet_unset_ip6_ethernet_neighbor (vm, a->sw_if_index, &a->addr);
}
static int
}
static int
@@
-1121,8
+1120,7
@@
set_ip6_neighbor (vlib_main_t * vm,
mac_address, sizeof (mac_address),
is_static, is_no_fib_entry);
else
mac_address, sizeof (mac_address),
is_static, is_no_fib_entry);
else
- vnet_unset_ip6_ethernet_neighbor (vm, sw_if_index, &addr,
- mac_address, sizeof (mac_address));
+ vnet_unset_ip6_ethernet_neighbor (vm, sw_if_index, &addr);
return 0;
}
return 0;
}
@@
-4927,8
+4925,7
@@
ip6_neighbor_proxy_add_del (u32 sw_if_index, ip6_address_t * addr, u8 is_del)
sw_if_index,
~0, 1, FIB_ROUTE_PATH_FLAG_NONE);
/* flush the ND cache of this address if it's there */
sw_if_index,
~0, 1, FIB_ROUTE_PATH_FLAG_NONE);
/* flush the ND cache of this address if it's there */
- vnet_unset_ip6_ethernet_neighbor (vlib_get_main (),
- sw_if_index, addr, NULL, 0);
+ vnet_unset_ip6_ethernet_neighbor (vlib_get_main (), sw_if_index, addr);
}
else
{
}
else
{