aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/udp/face_udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/faces/udp/face_udp.c')
-rw-r--r--hicn-plugin/src/faces/udp/face_udp.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/hicn-plugin/src/faces/udp/face_udp.c b/hicn-plugin/src/faces/udp/face_udp.c
index 6f345925b..7858db644 100644
--- a/hicn-plugin/src/faces/udp/face_udp.c
+++ b/hicn-plugin/src/faces/udp/face_udp.c
@@ -81,15 +81,17 @@ hicn_face_udp_init (vlib_main_t * vm)
/* Default Strategy has index 0 and it always exists */
strategy_face_udp4_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_udp4_output_node.index);
+ hicn_face_udp4_output_node.
+ index);
strategy_face_udp6_vlib_edge =
vlib_node_add_next (vm,
- hicn_dpo_get_strategy_vft
- (default_dpo.hicn_dpo_get_type
- ())->get_strategy_node_index (),
+ hicn_dpo_get_strategy_vft (default_dpo.
+ hicn_dpo_get_type ())->
+ get_strategy_node_index (),
hicn_face_udp6_output_node.index);
/*
@@ -265,17 +267,31 @@ hicn_face_udp_add (const ip46_address_t * local_addr,
return HICN_ERROR_IPS_ADDR_TYPE_NONUNIFORM;
}
+ for (int i = 0; i < HICN_N_COUNTER; i++)
+ {
+ vlib_validate_combined_counter (&counters[(*pfaceid) * HICN_N_COUNTER],
+ i);
+ vlib_zero_combined_counter (&counters[(*pfaceid) * HICN_N_COUNTER], i);
+ }
+
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));
+ /* *INDENT-OFF* */
*retx = (retx_t)
{
- .prefix = 0,.dpo = (dpo_id_t)
+ .prefix = 0,
+ .dpo = (dpo_id_t)
{
- .dpoi_type = hicn_face_udp_type,.dpoi_proto =
- dpo_proto,.dpoi_next_node = 0,.dpoi_index = *pfaceid,}
+ .dpoi_type = hicn_face_udp_type,
+ .dpoi_proto = dpo_proto,
+ .dpoi_next_node = 0,
+ .dpoi_index = *pfaceid,
+ }
};
+ /* *INDENT-ON* */
return ret;
}