+
+ hi = vnet_get_hw_interface (vnm, hw_if_index);
+
+ /* clear old stats of freed interface before reuse */
+ vnet_interface_main_t * im = &vnm->interface_main;
+ vnet_interface_counter_lock (im);
+ vlib_zero_combined_counter (
+ &im->combined_sw_if_counters[VNET_INTERFACE_COUNTER_TX],
+ hi->sw_if_index);
+ vlib_zero_combined_counter (
+ &im->combined_sw_if_counters[VNET_INTERFACE_COUNTER_RX],
+ hi->sw_if_index);
+ vlib_zero_simple_counter (
+ &im->sw_if_counters[VNET_INTERFACE_COUNTER_DROP],
+ hi->sw_if_index);
+ vnet_interface_counter_unlock (im);