16 #ifndef included_vnet_handoff_h 17 #define included_vnet_handoff_h 52 new_tail = __sync_add_and_fetch (&fq->
tail, 1);
58 elt = fq->
elts + (new_tail & (fq->
nelts - 1));
74 handoff_queue_by_worker_index)
78 fq = handoff_queue_by_worker_index[vlib_worker_index];
90 handoff_queue_by_worker_index[vlib_worker_index] = fq;
101 handoff_queue_elt_by_worker_index)
105 if (handoff_queue_elt_by_worker_index[vlib_worker_index])
106 return handoff_queue_elt_by_worker_index[vlib_worker_index];
110 handoff_queue_elt_by_worker_index[vlib_worker_index] = elt;
138 #define MPLS_BOTTOM_OF_STACK_BIT_MASK 0x00000100U 139 #define MPLS_LABEL_MASK 0xFFFFF000U 152 goto bottom_lbl_found;
159 goto bottom_lbl_found;
166 goto bottom_lbl_found;
173 goto bottom_lbl_found;
180 goto bottom_lbl_found;
190 ip_ver = (*((
u8 *) m) >> 4);
222 else if (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_IP6))
226 else if (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_MPLS_UNICAST))
230 else if ((h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_VLAN)) ||
231 (h0->
type == clib_host_to_net_u16 (ETHERNET_TYPE_DOT1AD)))
235 outer = (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_VLAN)) ?
238 clib_host_to_net_u16 (ETHERNET_TYPE_IP4))
242 else if (outer->
type == clib_host_to_net_u16 (ETHERNET_TYPE_IP6))
246 else if (outer->
type ==
247 clib_host_to_net_u16 (ETHERNET_TYPE_MPLS_UNICAST))
253 hash_key = outer->
type;
static vlib_frame_queue_elt_t * vlib_get_handoff_queue_elt(u32 vlib_worker_index)
static void vlib_worker_thread_barrier_check(void)
vlib_frame_queue_elt_t * elts
vlib_frame_queue_t ** vlib_frame_queues
static vlib_frame_queue_elt_t * dpdk_get_handoff_queue_elt(u32 vlib_worker_index, vlib_frame_queue_elt_t **handoff_queue_elt_by_worker_index)
#define MPLS_BOTTOM_OF_STACK_BIT_MASK
static void vlib_put_handoff_queue_elt(vlib_frame_queue_elt_t *hf)
static u64 ipv4_get_key(ip4_header_t *ip)
static vlib_frame_queue_t * is_vlib_handoff_queue_congested(u32 vlib_worker_index, u32 queue_hi_thresh, vlib_frame_queue_t **handoff_queue_by_worker_index)
static u64 ipv6_get_key(ip6_header_t *ip)
static u64 eth_get_key(ethernet_header_t *h0)
static u64 mpls_get_key(mpls_unicast_header_t *m)
#define CLIB_MEMORY_BARRIER()
static uword rotate_left(uword x, uword i)