Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve Load-Balance MAPs
[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
5d1fb6f
..
ee80ee3
100644
(file)
--- a/
src/vnet/ip/ip6_neighbor.c
+++ b/
src/vnet/ip/ip6_neighbor.c
@@
-557,6
+557,7
@@
ip6_ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai)
case IP_LOOKUP_NEXT_PUNT:
case IP_LOOKUP_NEXT_LOCAL:
case IP_LOOKUP_NEXT_REWRITE:
case IP_LOOKUP_NEXT_PUNT:
case IP_LOOKUP_NEXT_LOCAL:
case IP_LOOKUP_NEXT_REWRITE:
+ case IP_LOOKUP_NEXT_MCAST_MIDCHAIN:
case IP_LOOKUP_NEXT_MIDCHAIN:
case IP_LOOKUP_NEXT_ICMP_ERROR:
case IP_LOOKUP_N_NEXT:
case IP_LOOKUP_NEXT_MIDCHAIN:
case IP_LOOKUP_NEXT_ICMP_ERROR:
case IP_LOOKUP_N_NEXT:
@@
-581,7
+582,7
@@
vnet_set_ip6_ethernet_neighbor (vlib_main_t * vm,
u32 next_index;
pending_resolution_t *pr, *mc;
u32 next_index;
pending_resolution_t *pr, *mc;
- if (
os_get_cpu_number
())
+ if (
vlib_get_thread_index
())
{
set_unset_ip6_neighbor_rpc (vm, sw_if_index, a, link_layer_address,
1 /* set new neighbor */ , is_static,
{
set_unset_ip6_neighbor_rpc (vm, sw_if_index, a, link_layer_address,
1 /* set new neighbor */ , is_static,
@@
-629,10
+630,13
@@
vnet_set_ip6_ethernet_neighbor (vlib_main_t * vm,
n->fib_entry_index =
fib_table_entry_update_one_path (fib_index, &pfx,
FIB_SOURCE_ADJ,
n->fib_entry_index =
fib_table_entry_update_one_path (fib_index, &pfx,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_
NONE
,
+ FIB_ENTRY_FLAG_
ATTACHED
,
FIB_PROTOCOL_IP6, &pfx.fp_addr,
n->key.sw_if_index, ~0, 1, NULL,
FIB_ROUTE_PATH_FLAG_NONE);
FIB_PROTOCOL_IP6, &pfx.fp_addr,
n->key.sw_if_index, ~0, 1, NULL,
FIB_ROUTE_PATH_FLAG_NONE);
+ }
+ else
+ {
n->flags |= IP6_NEIGHBOR_FLAG_NO_FIB_ENTRY;
}
}
n->flags |= IP6_NEIGHBOR_FLAG_NO_FIB_ENTRY;
}
}
@@
-722,7
+726,7
@@
vnet_unset_ip6_ethernet_neighbor (vlib_main_t * vm,
uword *p;
int rv = 0;
uword *p;
int rv = 0;
- if (
os_get_cpu_number
())
+ if (
vlib_get_thread_index
())
{
set_unset_ip6_neighbor_rpc (vm, sw_if_index, a, link_layer_address,
0 /* unset */ , 0, 0);
{
set_unset_ip6_neighbor_rpc (vm, sw_if_index, a, link_layer_address,
0 /* unset */ , 0, 0);
@@
-1000,8
+1004,7
@@
icmp6_neighbor_solicitation_or_advertisement (vlib_main_t * vm,
if (ADJ_INDEX_INVALID != src_adj_index0)
{
if (ADJ_INDEX_INVALID != src_adj_index0)
{
- ip_adjacency_t *adj0 =
- ip_get_adjacency (&im->lookup_main, src_adj_index0);
+ ip_adjacency_t *adj0 = adj_get (src_adj_index0);
/* Allow all realistic-looking rewrite adjacencies to pass */
ni0 = adj0->lookup_next_index;
/* Allow all realistic-looking rewrite adjacencies to pass */
ni0 = adj0->lookup_next_index;
@@
-1027,7
+1030,7
@@
icmp6_neighbor_solicitation_or_advertisement (vlib_main_t * vm,
/* If src address unspecified or link local, donot learn neighbor MAC */
if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 &&
/* If src address unspecified or link local, donot learn neighbor MAC */
if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 &&
- !ip6_sadd_unspecified
&& !ip6_sadd_link_local
))
+ !ip6_sadd_unspecified))
{
ip6_neighbor_main_t *nm = &ip6_neighbor_main;
if (nm->limit_neighbor_cache_size &&
{
ip6_neighbor_main_t *nm = &ip6_neighbor_main;
if (nm->limit_neighbor_cache_size &&
@@
-1040,7
+1043,7
@@
icmp6_neighbor_solicitation_or_advertisement (vlib_main_t * vm,
&h0->target_address,
o0->ethernet_address,
sizeof (o0->ethernet_address),
&h0->target_address,
o0->ethernet_address,
sizeof (o0->ethernet_address),
- 0,
0
);
+ 0,
ip6_sadd_link_local
);
}
if (is_solicitation && error0 == ICMP6_ERROR_NONE)
}
if (is_solicitation && error0 == ICMP6_ERROR_NONE)
@@
-1321,8
+1324,7
@@
icmp6_router_solicitation (vlib_main_t * vm,
if (ADJ_INDEX_INVALID != src_adj_index0)
{
if (ADJ_INDEX_INVALID != src_adj_index0)
{
- ip_adjacency_t *adj0 = ip_get_adjacency (&im->lookup_main,
- src_adj_index0);
+ ip_adjacency_t *adj0 = adj_get (src_adj_index0);
error0 = (adj0->rewrite_header.sw_if_index != sw_if_index0
?
error0 = (adj0->rewrite_header.sw_if_index != sw_if_index0
?