diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-12-11 09:57:58 +0100 |
---|---|---|
committer | Aberto Compagno <acompagn+fdio@cisco.com> | 2020-01-30 08:21:50 +0000 |
commit | 38682396416f315fb5c5b0f8c25beb7a6a909d4f (patch) | |
tree | 9b56f4835a8936252f87bc19a27432b4bb8587c0 /hicn-plugin/src/faces | |
parent | fa11d711aaab5e4cba7e89dcc896866f3e73db3f (diff) |
[HICN-445] Update to vpp 20.01
Change-Id: I19a442080b6ca8b0477a8f92f161282288c395ee
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces')
-rw-r--r-- | hicn-plugin/src/faces/app/address_mgr.c | 26 | ||||
-rw-r--r-- | hicn-plugin/src/faces/app/face_prod_node.c | 19 | ||||
-rw-r--r-- | hicn-plugin/src/faces/face.h | 1 | ||||
-rw-r--r-- | hicn-plugin/src/faces/ip/face_ip.c | 4 | ||||
-rw-r--r-- | hicn-plugin/src/faces/ip/face_ip_node.c | 2 | ||||
-rw-r--r-- | hicn-plugin/src/faces/ip/iface_ip_node.c | 2 | ||||
-rw-r--r-- | hicn-plugin/src/faces/udp/face_udp.c | 8 | ||||
-rw-r--r-- | hicn-plugin/src/faces/udp/face_udp_node.c | 4 |
8 files changed, 30 insertions, 36 deletions
diff --git a/hicn-plugin/src/faces/app/address_mgr.c b/hicn-plugin/src/faces/app/address_mgr.c index 76a7e0f6d..1674379c4 100644 --- a/hicn-plugin/src/faces/app/address_mgr.c +++ b/hicn-plugin/src/faces/app/address_mgr.c @@ -25,7 +25,7 @@ #include <vnet/ip/ip4.h> //ip4_add_del_ip_address #include <vnet/ip/ip6.h> //ip6_add_del_ip_address #include <vnet/fib/fib_types.h> //FIB_PROTOCOL_IP4/6, FIB_NODE_INDEX_INVALID -#include <vnet/fib/fib_entry.h> //FIB_SOURCE_PLUGIN_HI +#include <vnet/fib/fib_entry.h> //FIB_SOURCE_PRIORITY_HI #include <vnet/fib/fib_table.h> #include <vppinfra/format.h> #include <vnet/interface.h> //appif_flags @@ -89,19 +89,19 @@ get_two_ip4_addresses (ip4_address_t * appif_addr, ip4_address_t * nh_addr) fib_pfx.fp_addr = to_ip46 ( /* is_v6 */ 0, appif_addr->as_u8); fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); - fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PLUGIN_HI); + fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI); if (fib_entry_index != FIB_NODE_INDEX_INVALID) { fib_pfx.fp_addr = to_ip46 ( /* is_v6 */ 0, nh_addr->as_u8); fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); fib_table_unlock (fib_index, fib_pfx.fp_proto, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); } if (fib_entry_index != FIB_NODE_INDEX_INVALID) { @@ -141,19 +141,19 @@ get_two_ip6_addresses (ip6_address_t * appif_addr, ip6_address_t * nh_addr) fib_pfx.fp_addr = to_ip46 ( /* is_v6 */ 1, appif_addr->as_u8); fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); - fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PLUGIN_HI); + fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI); if (fib_entry_index != FIB_NODE_INDEX_INVALID) { fib_pfx.fp_addr = to_ip46 ( /* is_v6 */ 0, nh_addr->as_u8); fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); fib_table_unlock (fib_index, fib_pfx.fp_proto, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); } if (fib_entry_index != FIB_NODE_INDEX_INVALID) { @@ -184,9 +184,9 @@ get_ip4_address () fib_pfx.fp_addr = to_ip46 ( /* is_v6 */ 0, prefix->as_u8); fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); - fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PLUGIN_HI); + fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI); increment_v4_address (prefix, 1); } while (fib_entry_index != FIB_NODE_INDEX_INVALID); @@ -211,9 +211,9 @@ get_ip6_address () fib_pfx.fp_addr = to_ip46 ( /* is_v6 */ 1, prefix->as_u8); fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); - fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PLUGIN_HI); + fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI); increment_v6_address (prefix, 1); } while (fib_entry_index != FIB_NODE_INDEX_INVALID); diff --git a/hicn-plugin/src/faces/app/face_prod_node.c b/hicn-plugin/src/faces/app/face_prod_node.c index 48e7c4259..e2967bf39 100644 --- a/hicn-plugin/src/faces/app/face_prod_node.c +++ b/hicn-plugin/src/faces/app/face_prod_node.c @@ -80,7 +80,7 @@ match_ip4_name (u32 * name, fib_prefix_t * prefix) } static_always_inline int -match_ip6_name (u32x4 * name, fib_prefix_t * prefix) +match_ip6_name (u8 * name, fib_prefix_t * prefix) { union { @@ -90,18 +90,13 @@ match_ip6_name (u32x4 * name, fib_prefix_t * prefix) } xor_sum __attribute__ ((aligned (sizeof (u32x4)))); #ifdef CLIB_HAVE_VEC128 - if (U32X4_ALIGNED (name)) - { //SSE can't handle unaligned data - xor_sum.as_u32x4 = *((u32x4 *) name) & - UNION_CAST (prefix->fp_addr.ip6.as_u64[0], u32x4); - } - else -#endif /* CLIB_HAVE_VEC128 */ - { + u32x4u *data = (u32x4u *)name; + xor_sum.as_u32x4 = *(data) & + UNION_CAST (prefix->fp_addr.ip6.as_u64[0], u32x4); +#else xor_sum.as_u64[0] = ((u64 *) name)[0] & prefix->fp_addr.ip6.as_u64[0]; xor_sum.as_u64[1] = ((u64 *) name)[1] & prefix->fp_addr.ip6.as_u64[1]; - } - +#endif /* CLIB_HAVE_VEC128 */ return (xor_sum.as_u64[0] == prefix->fp_addr.ip6.as_u64[0]) && (xor_sum.as_u64[1] == prefix->fp_addr.ip6.as_u64[1]); } @@ -120,7 +115,7 @@ hicn_face_prod_next_from_data_hdr (vlib_node_runtime_t * node, } else if (PREDICT_TRUE (v == 0x60 && !ip46_address_is_ip4 (&prefix->fp_addr))) { - match_res = match_ip6_name ((u32x4 *) & (ptr[8]), prefix); + match_res = match_ip6_name (& (ptr[8]), prefix); } return match_res ? HICN_FACE_PROD_NEXT_DATA_IP4 + (v == diff --git a/hicn-plugin/src/faces/face.h b/hicn-plugin/src/faces/face.h index d4f7f356a..b758ece06 100644 --- a/hicn-plugin/src/faces/face.h +++ b/hicn-plugin/src/faces/face.h @@ -20,7 +20,6 @@ #include <vlib/vlib.h> #include <vnet/dpo/dpo.h> #include <vnet/adj/adj_types.h> - #include "../hicn.h" typedef u8 hicn_face_flags_t; diff --git a/hicn-plugin/src/faces/ip/face_ip.c b/hicn-plugin/src/faces/ip/face_ip.c index d4ba158de..f4ae5429d 100644 --- a/hicn-plugin/src/faces/ip/face_ip.c +++ b/hicn-plugin/src/faces/ip/face_ip.c @@ -172,7 +172,7 @@ hicn_face_ip_del (hicn_face_id_t face_id) * @brief Helper for handling midchain adjacencies */ void face_midchain_fixup_t (vlib_main_t * vm, - struct ip_adjacency_t_ * adj, + const struct ip_adjacency_t_ * adj, vlib_buffer_t * b0, const void *data) { vnet_buffer (b0)->sw_if_index[VLIB_TX] = 0; @@ -213,7 +213,7 @@ hicn_face_ip_find_adj (const ip46_address_t * remote_addr, { u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup (fib_index, &fib_pfx); diff --git a/hicn-plugin/src/faces/ip/face_ip_node.c b/hicn-plugin/src/faces/ip/face_ip_node.c index 1229b4eaa..0eeeab6fb 100644 --- a/hicn-plugin/src/faces/ip/face_ip_node.c +++ b/hicn-plugin/src/faces/ip/face_ip_node.c @@ -589,7 +589,7 @@ hicn_face_rewrite_interest (vlib_main_t * vm, vlib_buffer_t * b0, u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup (fib_index, &fib_pfx); diff --git a/hicn-plugin/src/faces/ip/iface_ip_node.c b/hicn-plugin/src/faces/ip/iface_ip_node.c index 62ccc514d..8adef50d9 100644 --- a/hicn-plugin/src/faces/ip/iface_ip_node.c +++ b/hicn-plugin/src/faces/ip/iface_ip_node.c @@ -13,11 +13,11 @@ * limitations under the License. */ -#include <hicn/hicn.h> #include "face_ip.h" #include "dpo_ip.h" #include "../../strategy_dpo_manager.h" #include "../face.h" +#include "../../hicn.h" #include "../../infra.h" #include "../../cache_policies/cs_lru.h" diff --git a/hicn-plugin/src/faces/udp/face_udp.c b/hicn-plugin/src/faces/udp/face_udp.c index 54d773358..e2fa3227b 100644 --- a/hicn-plugin/src/faces/udp/face_udp.c +++ b/hicn-plugin/src/faces/udp/face_udp.c @@ -147,7 +147,7 @@ hicn_face_udp_add (const ip46_address_t * local_addr, u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup (fib_index, &fib_pfx); ip_adj = fib_entry_get_adj (fib_entry_index); @@ -199,7 +199,7 @@ hicn_face_udp_add (const ip46_address_t * local_addr, *pfaceid = hicn_dpoi_get_index (face); dpo_proto = DPO_PROTO_IP4; - fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PLUGIN_HI); + fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI); } else if (!ip46_address_is_ip4 (local_addr) && !ip46_address_is_ip4 (remote_addr)) @@ -211,7 +211,7 @@ hicn_face_udp_add (const ip46_address_t * local_addr, u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup (fib_index, &fib_pfx); ip_adj = fib_entry_get_adj (fib_entry_index); @@ -254,7 +254,7 @@ hicn_face_udp_add (const ip46_address_t * local_addr, *pfaceid = hicn_dpoi_get_index (face); dpo_proto = DPO_PROTO_IP6; - fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PLUGIN_HI); + fib_table_unlock (fib_index, fib_pfx.fp_proto, FIB_SOURCE_PRIORITY_HI); } else { diff --git a/hicn-plugin/src/faces/udp/face_udp_node.c b/hicn-plugin/src/faces/udp/face_udp_node.c index 232b86d70..c82336659 100644 --- a/hicn-plugin/src/faces/udp/face_udp_node.c +++ b/hicn-plugin/src/faces/udp/face_udp_node.c @@ -557,7 +557,7 @@ hicn_face_udp4_encap (vlib_main_t * vm, u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup (fib_index, &fib_pfx); @@ -625,7 +625,7 @@ hicn_face_udp6_encap (vlib_main_t * vm, u32 fib_index = fib_table_find_or_create_and_lock (fib_pfx.fp_proto, HICN_FIB_TABLE, - FIB_SOURCE_PLUGIN_HI); + FIB_SOURCE_PRIORITY_HI); fib_entry_index = fib_table_lookup (fib_index, &fib_pfx); |