return s;
}
-#endif /* CLIB_MARCH_VARIANT */
vlib_node_registration_t nsim_node;
+#endif /* CLIB_MARCH_VARIANT */
#define foreach_nsim_error \
_(BUFFERED, "Packets buffered") \
? nsm->sw_if_index1 : nsm->sw_if_index0;
ep->current_length = vlib_buffer_length_in_chain (vm, b[0]);
ASSERT (ep->current_length <= WHEEL_ENTRY_DATA_SIZE);
- clib_memcpy (ep->data, vlib_buffer_get_current (b[0]),
- ep->current_length);
+ clib_memcpy_fast (ep->data, vlib_buffer_get_current (b[0]),
+ ep->current_length);
}
else /* out of wheel space, drop pkt */
- b[0]->error = no_buffer_error;
+ {
+ b[0]->error = no_buffer_error;
+ is_drop0 = 1;
+ }
if (is_trace)
{
nsim_trace_t *t = vlib_add_trace (vm, node, b[0], sizeof (*t));
t->expires = expires;
t->is_drop = is_drop0;
- if (is_drop0 == 0)
- t->tx_sw_if_index = ep->tx_sw_if_index;
+ t->tx_sw_if_index = (is_drop0 == 0) ? ep->tx_sw_if_index : 0;
}
}