aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/ip/face_ip.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-02-19 18:46:36 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-02-20 18:03:16 +0100
commit1c5106f66a6749266cb1d228eda98413c80cbf1f (patch)
tree40bd4c7c42eaabd3fd038caa8f9e2fe432f9a434 /hicn-plugin/src/faces/ip/face_ip.c
parent286fd55fc0cf620747209570a32b79d97d50d9b4 (diff)
[HICN-71]
- Handling the case in which a pushed data hit an existing pit entry (created after the data has gone through the data_pcslookup_node). In this case the data packet is forwarded to the data_fwd_node - Handling the case in which the hash table (in pcs) is full and it is not possible to allocate another bucket. In this case the packet is dropped. - Copying packets whose length is less than 128B. VPP prevents to create a chain of vlib_buffer where the first, or middle, vlib_buffer are holding less then 128B. [HICN-72] - Assign a /128 subnet to the producer app face. Change-Id: I6c19d6d127774a7f59ac69ac965d4bcd6a72becc Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces/ip/face_ip.c')
-rw-r--r--hicn-plugin/src/faces/ip/face_ip.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/hicn-plugin/src/faces/ip/face_ip.c b/hicn-plugin/src/faces/ip/face_ip.c
index c7f6a1ba1..c1e264e44 100644
--- a/hicn-plugin/src/faces/ip/face_ip.c
+++ b/hicn-plugin/src/faces/ip/face_ip.c
@@ -40,21 +40,17 @@ hicn_face_ip_init (vlib_main_t * vm)
/* Default Strategy has index 0 and it always exists */
strategy_face_ip4_vlib_edge = vlib_node_add_next (vm,
hicn_dpo_get_strategy_vft
- (default_dpo.
- hicn_dpo_get_type ())->
- get_strategy_node_index
+ (default_dpo.hicn_dpo_get_type
+ ())->get_strategy_node_index
(),
- hicn_face_ip4_output_node.
- index);
+ hicn_face_ip4_output_node.index);
strategy_face_ip6_vlib_edge = vlib_node_add_next (vm,
hicn_dpo_get_strategy_vft
- (default_dpo.
- hicn_dpo_get_type ())->
- get_strategy_node_index
+ (default_dpo.hicn_dpo_get_type
+ ())->get_strategy_node_index
(),
- hicn_face_ip6_output_node.
- index);
+ hicn_face_ip6_output_node.index);
/*
* Create and edge between al the other strategy nodes
* and the ip_encap nodes.
@@ -73,6 +69,17 @@ hicn_face_ip_init (vlib_main_t * vm)
ASSERT (temp_index6 == strategy_face_ip6_vlib_edge);
}
+ u32 temp_index4 = vlib_node_add_next (vm,
+ hicn_interest_hitpit_node.index,
+ hicn_face_ip4_output_node.index);
+ u32 temp_index6 = vlib_node_add_next (vm,
+ hicn_interest_hitpit_node.index,
+ hicn_face_ip6_output_node.index);
+
+ ASSERT (temp_index4 == strategy_face_ip4_vlib_edge);
+ ASSERT (temp_index6 == strategy_face_ip6_vlib_edge);
+
+
hicn_dpo_ip_module_init ();
register_face_type (hicn_face_ip_type, &ip_vft, "ip");
@@ -224,8 +231,7 @@ hicn_face_ip_add (const ip46_address_t * local_addr,
}
retx_t *retx = vlib_process_signal_event_data (vlib_get_main (),
- hicn_mapme_eventmgr_process_node.
- index,
+ hicn_mapme_eventmgr_process_node.index,
HICN_MAPME_EVENT_FACE_ADD, 1,
sizeof (retx_t));
*retx = (retx_t)
@@ -305,8 +311,8 @@ hicn_face_ip_get_dpo (hicn_face_t * face, dpo_id_t * dpo)
hicn_face_ip_t *face_ip = (hicn_face_ip_t *) face->data;
return hicn_dpo_ip_create_from_face (face, dpo,
- ip46_address_is_ip4 (&face_ip->
- remote_addr) ?
+ ip46_address_is_ip4
+ (&face_ip->remote_addr) ?
strategy_face_ip4_vlib_edge :
strategy_face_ip6_vlib_edge);
}