- /* Decide where to send the packet */
- next_index = is_ip4 ? tcp4_output_node.index : tcp6_output_node.index;
- tcp_trajectory_add_start (b, 2);
-
- /* Get frame to v4/6 output node */
- f = wrk->tx_frames[!is_ip4];
- if (!f)
- {
- f = vlib_get_frame_to_node (wrk->vm, next_index);
- ASSERT (f);
- wrk->tx_frames[!is_ip4] = f;
- }
- to_next = vlib_frame_vector_args (f);
- to_next[f->n_vectors] = bi;
- f->n_vectors += 1;
- if (flush || f->n_vectors == VLIB_FRAME_SIZE)
- {
- vlib_put_frame_to_node (wrk->vm, next_index, f);
- wrk->tx_frames[!is_ip4] = 0;
- }
-}
-
-static void
-tcp_enqueue_to_output (tcp_worker_ctx_t * wrk, vlib_buffer_t * b, u32 bi,
- u8 is_ip4)
-{
- tcp_enqueue_to_output_i (wrk, b, bi, is_ip4, 0);
+ st = session_type_from_proto_and_ip (TRANSPORT_PROTO_TCP, is_ip4);
+ session_add_pending_tx_buffer (st, wrk->vm->thread_index, bi);