- _vec_len (tm->rx_buffers) = i_rx;
-
- b_first->total_length_not_including_first_buffer =
- (n_bytes_in_packet > buffer_size) ? n_bytes_in_packet - buffer_size : 0;
- b_first->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
-
- VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b_first);
-
- vnet_buffer (b_first)->sw_if_index[VLIB_RX] = ti->sw_if_index;
- vnet_buffer (b_first)->sw_if_index[VLIB_TX] = (u32)~0;
-
- b_first->error = node->errors[TAPCLI_ERROR_NONE];
- next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
- next_index = (ti->per_interface_next_index != ~0) ?
- ti->per_interface_next_index : next_index;
- next_index = admin_down ? VNET_DEVICE_INPUT_NEXT_DROP : next_index;
-
- to_next[0] = bi_first;
- to_next++;
- n_left_to_next--;
-
- vnet_feature_start_device_input_x1 (ti->sw_if_index, &next_index,
- b_first, 0);
-
- vlib_validate_buffer_enqueue_x1 (vm, node, next,
- to_next, n_left_to_next,
- bi_first, next_index);
-
- /* Interface counters for tapcli interface. */
- if (PREDICT_TRUE(!admin_down)) {
- vlib_increment_combined_counter (
- vnet_main.interface_main.combined_sw_if_counters
- + VNET_INTERFACE_COUNTER_RX,
- os_get_cpu_number(), ti->sw_if_index,
- 1, n_bytes_in_packet);
-
- if (PREDICT_FALSE(n_trace > 0)) {
- vlib_trace_buffer (vm, node, next_index,
- b_first, /* follow_chain */ 1);
- n_trace--;
- set_trace = 1;
- tapcli_rx_trace_t *t0 = vlib_add_trace (vm, node, b_first, sizeof (*t0));
- t0->sw_if_index = si->sw_if_index;
- }
+ b_first->total_length_not_including_first_buffer =
+ (n_bytes_in_packet >
+ buffer_size) ? n_bytes_in_packet - buffer_size : 0;
+ b_first->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
+
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b_first);
+
+ vnet_buffer (b_first)->sw_if_index[VLIB_RX] = ti->sw_if_index;
+ vnet_buffer (b_first)->sw_if_index[VLIB_TX] = (u32) ~ 0;
+
+ b_first->error = node->errors[TAPCLI_ERROR_NONE];
+ next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
+ next_index = (ti->per_interface_next_index != ~0) ?
+ ti->per_interface_next_index : next_index;
+ next_index = admin_down ? VNET_DEVICE_INPUT_NEXT_DROP : next_index;
+
+ to_next[0] = bi_first;
+ to_next++;
+ n_left_to_next--;
+
+ vnet_feature_start_device_input_x1 (ti->sw_if_index, &next_index,
+ b_first);
+
+ vlib_validate_buffer_enqueue_x1 (vm, node, next,
+ to_next, n_left_to_next,
+ bi_first, next_index);
+
+ /* Interface counters for tapcli interface. */
+ if (PREDICT_TRUE (!admin_down))
+ {
+ vlib_increment_combined_counter (vnet_main.interface_main.
+ combined_sw_if_counters +
+ VNET_INTERFACE_COUNTER_RX,
+ thread_index, ti->sw_if_index, 1,
+ n_bytes_in_packet);
+
+ if (PREDICT_FALSE (n_trace > 0))
+ {
+ vlib_trace_buffer (vm, node, next_index,
+ b_first, /* follow_chain */ 1);
+ n_trace--;
+ set_trace = 1;
+ tapcli_rx_trace_t *t0 =
+ vlib_add_trace (vm, node, b_first, sizeof (*t0));
+ t0->sw_if_index = si->sw_if_index;
+ }
+ }