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: fix punt cli to only consumes a line of input
[vpp.git]
/
src
/
vnet
/
lisp-gpe
/
lisp_gpe_adjacency.c
diff --git
a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
index
1b53e4d
..
cd0b338
100644
(file)
--- a/
src/vnet/lisp-gpe/lisp_gpe_adjacency.c
+++ b/
src/vnet/lisp-gpe/lisp_gpe_adjacency.c
@@
-46,8
+46,8
@@
BVT (clib_bihash)
#define LISP_ADJ_SET_KEY(_key, _itf, _nh) \
{ \
#define LISP_ADJ_SET_KEY(_key, _itf, _nh) \
{ \
- _key.key[0] =
(_nh)->ip.v6.as_u64[0];
\
- _key.key[1] =
(_nh)->ip.v6.as_u64[1];
\
+ _key.key[0] =
ip_addr_v6((_nh)).as_u64[0];
\
+ _key.key[1] =
ip_addr_v6((_nh)).as_u64[1];
\
_key.key[2] = (_itf); \
}
_key.key[2] = (_itf); \
}
@@
-99,9
+99,9
@@
lisp_gpe_adj_get_fib_chain_type (const lisp_gpe_adjacency_t * ladj)
{
switch (ip_addr_version (&ladj->remote_rloc))
{
{
switch (ip_addr_version (&ladj->remote_rloc))
{
- case IP4:
+ case
AF_
IP4:
return (FIB_FORW_CHAIN_TYPE_UNICAST_IP4);
return (FIB_FORW_CHAIN_TYPE_UNICAST_IP4);
- case IP6:
+ case
AF_
IP6:
return (FIB_FORW_CHAIN_TYPE_UNICAST_IP6);
default:
ASSERT (0);
return (FIB_FORW_CHAIN_TYPE_UNICAST_IP6);
default:
ASSERT (0);
@@
-116,11
+116,11
@@
ip46_address_to_ip_address (const ip46_address_t * a, ip_address_t * b)
if (ip46_address_is_ip4 (a))
{
clib_memset (b, 0, sizeof (*b));
if (ip46_address_is_ip4 (a))
{
clib_memset (b, 0, sizeof (*b));
- ip_address_set (b, &a->ip4, IP4);
+ ip_address_set (b, &a->ip4,
AF_
IP4);
}
else
{
}
else
{
- ip_address_set (b, &a->ip6, IP6);
+ ip_address_set (b, &a->ip6,
AF_
IP6);
}
}
}
}
@@
-159,7
+159,7
@@
lisp_gpe_adj_stack (lisp_gpe_adjacency_t * ladj)
fib_protocol_t nh_proto;
ip46_address_t nh;
fib_protocol_t nh_proto;
ip46_address_t nh;
-
ip_address_to_46 (&ladj->remote_rloc, &nh, &nh_proto
);
+
nh_proto = ip_address_to_46 (&ladj->remote_rloc, &nh
);
/*
* walk all the adjacencies on th lisp interface and restack them
/*
* walk all the adjacencies on th lisp interface and restack them
@@
-206,7
+206,8
@@
lisp_afi_from_vnet_link_type (vnet_link_t link)
}
static void
}
static void
-lisp_gpe_increment_stats_counters (lisp_cp_main_t * lcm, ip_adjacency_t * adj,
+lisp_gpe_increment_stats_counters (lisp_cp_main_t * lcm,
+ const ip_adjacency_t * adj,
vlib_buffer_t * b)
{
lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
vlib_buffer_t * b)
{
lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
@@
-263,7
+264,7
@@
lisp_gpe_increment_stats_counters (lisp_cp_main_t * lcm, ip_adjacency_t * adj,
key.tunnel_index = ladj->tunnel_index;
uword *p = hash_get_mem (lgm->lisp_stats_index_by_key, &key);
key.tunnel_index = ladj->tunnel_index;
uword *p = hash_get_mem (lgm->lisp_stats_index_by_key, &key);
- ASSERT (p);
+ A
LWAYS_A
SSERT (p);
/* compute payload length starting after GPE */
u32 bytes = b->current_length - (lisp_data - b->data - b->current_data);
/* compute payload length starting after GPE */
u32 bytes = b->current_length - (lisp_data - b->data - b->current_data);
@@
-273,7
+274,8
@@
lisp_gpe_increment_stats_counters (lisp_cp_main_t * lcm, ip_adjacency_t * adj,
static void
lisp_gpe_fixup (vlib_main_t * vm,
static void
lisp_gpe_fixup (vlib_main_t * vm,
- ip_adjacency_t * adj, vlib_buffer_t * b, const void *data)
+ const ip_adjacency_t * adj,
+ vlib_buffer_t * b, const void *data)
{
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
{
lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();