- b0 = vlib_get_buffer (vm, bi0);
-
- ip0 = vlib_buffer_get_current (b0);
-
- next_worker_index = nat64_get_worker_in2out (&ip0->src_address);
-
- if (PREDICT_FALSE (next_worker_index != thread_index))
- {
- do_handoff = 1;
-
- if (next_worker_index != current_worker_index)
- {
- fq =
- is_vlib_frame_queue_congested (fq_index, next_worker_index,
- 30,
- congested_handoff_queue_by_worker_index);
-
- if (fq)
- {
- /* if this is 1st frame */
- if (!d)
- {
- d = vlib_get_frame_to_node (vm, nm->error_node_index);
- to_next_drop = vlib_frame_vector_args (d);
- }
-
- to_next_drop[0] = bi0;
- to_next_drop += 1;
- d->n_vectors++;
- goto trace0;
- }
-
- if (hf)
- hf->n_vectors = VLIB_FRAME_SIZE - n_left_to_next_worker;
-
- hf =
- vlib_get_worker_handoff_queue_elt (fq_index,
- next_worker_index,
- handoff_queue_elt_by_worker_index);
- n_left_to_next_worker = VLIB_FRAME_SIZE - hf->n_vectors;
- to_next_worker = &hf->buffer_index[hf->n_vectors];
- current_worker_index = next_worker_index;
- }
-
- ASSERT (to_next_worker != 0);
-
- /* enqueue to correct worker thread */
- to_next_worker[0] = bi0;
- to_next_worker++;
- n_left_to_next_worker--;
-
- if (n_left_to_next_worker == 0)
- {
- hf->n_vectors = VLIB_FRAME_SIZE;
- vlib_put_frame_queue_elt (hf);
- current_worker_index = ~0;
- handoff_queue_elt_by_worker_index[next_worker_index] = 0;
- hf = 0;
- }
- }
- else
- {
- do_handoff = 0;
- /* if this is 1st frame */
- if (!f)
- {
- f = vlib_get_frame_to_node (vm, to_node_index);
- to_next = vlib_frame_vector_args (f);
- }
-
- to_next[0] = bi0;
- to_next += 1;
- f->n_vectors++;
- }
-
- trace0: