/* TODO prefetch and quad-loop */
for (n = 0; n < n_rx_packets; n++)
{
- if ((ptd->flags[n] & (1 << PKT_RX_FDIR)) == 0)
+ if ((ptd->flags[n] & PKT_RX_FDIR) == 0)
continue;
fle = pool_elt_at_index (xd->flow_lookup_entries,
/* as DPDK is allocating empty buffers from mempool provided before interface
start for each queue, it is safe to store this in the template */
bt->buffer_pool_index = xd->buffer_pool_for_queue[queue_id];
+ bt->ref_count = 1;
vnet_buffer (bt)->feature_arc_index = 0;
bt->current_config_index = 0;
if (xd->flags & DPDK_DEVICE_FLAG_RX_IP4_CKSUM &&
(or_flags & PKT_RX_IP_CKSUM_BAD) == 0)
f->flags |= ETH_INPUT_FRAME_F_IP4_CKSUM_OK;
+ vlib_frame_no_append (f);
}
n_left_to_next -= n_rx_packets;
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
vlib_set_trace_count (vm, node, n_trace);
}
- /* rx pcap capture if enabled */
- if (PREDICT_FALSE (dm->pcap[VLIB_RX].pcap_enable))
- {
- u32 bi0;
- n_left = n_rx_packets;
- buffers = ptd->buffers;
- while (n_left)
- {
- bi0 = buffers[0];
- b0 = vlib_get_buffer (vm, bi0);
- buffers++;
-
- if (dm->pcap[VLIB_RX].pcap_sw_if_index == 0 ||
- dm->pcap[VLIB_RX].pcap_sw_if_index
- == vnet_buffer (b0)->sw_if_index[VLIB_RX])
- {
- struct rte_mbuf *mb;
- i16 data_start;
- i32 temp_advance;
-
- /*
- * Note: current_data will have advanced
- * when we skip ethernet input.
- * Temporarily back up to the original DMA
- * target, so we capture a valid ethernet frame
- */
- mb = rte_mbuf_from_vlib_buffer (b0);
-
- /* Figure out the original data_start */
- data_start = (mb->buf_addr + mb->data_off) - (void *) b0->data;
- /* Back up that far */
- temp_advance = b0->current_data - data_start;
- vlib_buffer_advance (b0, -temp_advance);
- /* Trace the packet */
- pcap_add_buffer (&dm->pcap[VLIB_RX].pcap_main, vm, bi0, 512);
- /* and advance again */
- vlib_buffer_advance (b0, temp_advance);
- }
- n_left--;
- }
- }
-
vlib_increment_combined_counter
(vnet_get_main ()->interface_main.combined_sw_if_counters
+ VNET_INTERFACE_COUNTER_RX, thread_index, xd->sw_if_index,