#include <math.h>
#include <vlib/vlib.h>
#include <vnet/vnet.h>
-#include <vnet/tcp/tcp.h>
#include <vppinfra/elog.h>
+#include <vnet/session/transport.h>
#include <vnet/session/application.h>
#include <vnet/session/session_debug.h>
#include <vlibmemory/unix_shared_memory_queue.h>
#undef _
};
-static u32 session_type_to_next[] = {
- SESSION_QUEUE_NEXT_TCP_IP4_OUTPUT,
- SESSION_QUEUE_NEXT_IP4_LOOKUP,
- SESSION_QUEUE_NEXT_TCP_IP6_OUTPUT,
- SESSION_QUEUE_NEXT_IP6_LOOKUP,
-};
-
always_inline void
session_tx_fifo_chain_tail (session_manager_main_t * smm, vlib_main_t * vm,
u8 thread_index, svm_fifo_t * fifo,
u32 n_bufs_per_evt, n_frames_per_evt, n_bufs_per_frame;
transport_connection_t *tc0;
transport_proto_vft_t *transport_vft;
+ transport_proto_t tp;
u32 next_index, next0, *to_next, n_left_to_next, bi0;
vlib_buffer_t *b0;
u32 tx_offset = 0, max_dequeue0, n_bytes_per_seg, left_for_seg;
u32 n_bytes_per_buf, deq_per_buf, deq_per_first_buf;
u32 buffers_allocated, buffers_allocated_this_call;
- next_index = next0 = session_type_to_next[s0->session_type];
+ next_index = next0 = smm->session_type_to_next[s0->session_type];
- transport_vft = transport_protocol_get_vft (s0->session_type);
+ tp = session_get_transport_proto (s0);
+ transport_vft = transport_protocol_get_vft (tp);
tc0 = transport_vft->get_connection (s0->connection_index, thread_index);
/* Make sure we have space to send and there's something to dequeue */
/* *INDENT-ON* */
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
- tcp_trajectory_add_start (b0, 3);
if (PREDICT_FALSE (n_trace > 0))
{
SESSION_EVT_DBG (SESSION_EVT_POLL_GAP_TRACK, smm, my_thread_index);
/*
- * Update TCP time
+ * Update transport time
*/
- tcp_update_time (now, my_thread_index);
+ transport_update_time (now, my_thread_index);
/*
* Get vpp queue events
.type = VLIB_NODE_TYPE_INPUT,
.n_errors = ARRAY_LEN (session_queue_error_strings),
.error_strings = session_queue_error_strings,
- .n_next_nodes = SESSION_QUEUE_N_NEXT,
.state = VLIB_NODE_STATE_DISABLED,
- .next_nodes =
- {
- [SESSION_QUEUE_NEXT_DROP] = "error-drop",
- [SESSION_QUEUE_NEXT_IP4_LOOKUP] = "ip4-lookup",
- [SESSION_QUEUE_NEXT_IP6_LOOKUP] = "ip6-lookup",
- [SESSION_QUEUE_NEXT_TCP_IP4_OUTPUT] = "tcp4-output",
- [SESSION_QUEUE_NEXT_TCP_IP6_OUTPUT] = "tcp6-output",
- },
};
/* *INDENT-ON* */