{
ssvm_shared_header_t *sh = intfc->sh;
vlib_main_t *vm = em->vlib_main;
- unix_shared_memory_queue_t *q;
+ svm_queue_t *q;
ssvm_eth_queue_elt_t *elt, *elts;
u32 elt_index;
u32 my_pid = intfc->my_pid;
ethernet_header_t *eh0;
u16 type0;
u32 n_rx_bytes = 0, l3_offset0;
- u32 cpu_index = os_get_cpu_number ();
+ u32 thread_index = vlib_get_thread_index ();
u32 trace_cnt __attribute__ ((unused)) = vlib_get_trace_count (vm, node);
volatile u32 *lock;
u32 *elt_indices;
return 0;
if (intfc->i_am_master)
- q = (unix_shared_memory_queue_t *) (sh->opaque[TO_MASTER_Q_INDEX]);
+ q = (svm_queue_t *) (sh->opaque[TO_MASTER_Q_INDEX]);
else
- q = (unix_shared_memory_queue_t *) (sh->opaque[TO_SLAVE_Q_INDEX]);
+ q = (svm_queue_t *) (sh->opaque[TO_SLAVE_Q_INDEX]);
/* Nothing to do? */
if (q->cursize == 0)
;
while (q->cursize > 0)
{
- unix_shared_memory_queue_sub_raw (q, (u8 *) & elt_index);
+ svm_queue_sub_raw (q, (u8 *) & elt_index);
ASSERT (elt_index < 2048);
vec_add1 (intfc->rx_queue, elt_index);
}
next0 = SSVM_ETH_INPUT_NEXT_IP4_INPUT;
else if (type0 == ETHERNET_TYPE_IP6)
next0 = SSVM_ETH_INPUT_NEXT_IP6_INPUT;
- else if (type0 == ETHERNET_TYPE_MPLS_UNICAST)
+ else if (type0 == ETHERNET_TYPE_MPLS)
next0 = SSVM_ETH_INPUT_NEXT_MPLS_INPUT;
l3_offset0 = ((next0 == SSVM_ETH_INPUT_NEXT_IP4_INPUT ||
vlib_increment_combined_counter
(vnet_get_main ()->interface_main.combined_sw_if_counters
- + VNET_INTERFACE_COUNTER_RX, cpu_index,
+ + VNET_INTERFACE_COUNTER_RX, thread_index,
intfc->vlib_hw_if_index, rx_queue_index, n_rx_bytes);
+ vnet_device_increment_rx_packets (thread_index, rx_queue_index);
+
return rx_queue_index;
}