aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r--src/vnet/tcp/tcp.h56
1 files changed, 37 insertions, 19 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index ca650b7fa29..8676db413a0 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -34,7 +34,7 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler;
typedef enum _tcp_error
{
-#define tcp_error(n,s) TCP_ERROR_##n,
+#define tcp_error(f, n, s, d) TCP_ERROR_##f,
#include <vnet/tcp/tcp_error.def>
#undef tcp_error
TCP_N_ERROR,
@@ -45,19 +45,21 @@ typedef struct _tcp_lookup_dispatch
u8 next, error;
} tcp_lookup_dispatch_t;
-#define foreach_tcp_wrk_stat \
- _(timer_expirations, u64, "timer expirations") \
- _(rxt_segs, u64, "segments retransmitted") \
- _(tr_events, u32, "timer retransmit events") \
- _(to_closewait, u32, "timeout close-wait") \
- _(to_closewait2, u32, "timeout close-wait w/data") \
- _(to_finwait1, u32, "timeout fin-wait-1") \
- _(to_finwait2, u32, "timeout fin-wait-2") \
- _(to_lastack, u32, "timeout last-ack") \
- _(to_closing, u32, "timeout closing") \
- _(tr_abort, u32, "timer retransmit abort") \
- _(rst_unread, u32, "reset on close due to unread data") \
- _(no_buffer, u32, "out of buffers") \
+#define foreach_tcp_wrk_stat \
+ _ (timer_expirations, u64, "timer expirations") \
+ _ (rxt_segs, u64, "segments retransmitted") \
+ _ (tr_events, u32, "timer retransmit events") \
+ _ (to_establish, u32, "timeout establish") \
+ _ (to_persist, u32, "timeout persist") \
+ _ (to_closewait, u32, "timeout close-wait") \
+ _ (to_closewait2, u32, "timeout close-wait w/data") \
+ _ (to_finwait1, u32, "timeout fin-wait-1") \
+ _ (to_finwait2, u32, "timeout fin-wait-2") \
+ _ (to_lastack, u32, "timeout last-ack") \
+ _ (to_closing, u32, "timeout closing") \
+ _ (tr_abort, u32, "timer retransmit abort") \
+ _ (rst_unread, u32, "reset on close due to unread data") \
+ _ (no_buffer, u32, "out of buffers")
typedef struct tcp_wrk_stats_
{
@@ -66,6 +68,13 @@ typedef struct tcp_wrk_stats_
#undef _
} tcp_wrk_stats_t;
+typedef enum
+{
+#define _(name, type, str) TCP_STAT_##name,
+ foreach_tcp_wrk_stat
+#undef _
+} tcp_wrk_stats_e;
+
typedef struct tcp_free_req_
{
clib_time_type_t free_time;
@@ -190,6 +199,9 @@ typedef struct tcp_configuration_
/** Time to wait (sec) before cleaning up the connection */
f32 cleanup_time;
+ /** Time to wait (tcp ticks) for syn-rcvd connection to establish */
+ u32 syn_rcvd_time;
+
/** Number of preallocated connections */
u32 preallocated_connections;
@@ -215,9 +227,6 @@ typedef struct _tcp_main
/** vlib buffer size */
u32 bytes_per_buffer;
- /** Session layer edge indices to ip lookup (syns, rst) */
- u32 ipl_next_node[2];
-
/** Dispatch table by state and flags */
tcp_lookup_dispatch_t dispatch_table[TCP_N_STATES][64];
@@ -236,6 +245,9 @@ typedef struct _tcp_main
/** Flag that indicates if stack is on or off */
u8 is_enabled;
+ /** Set if counters on stats segment initialized */
+ u8 counters_init;
+
/** Flag that indicates if v4 punting is enabled */
u8 punt_unknown4;
@@ -268,6 +280,10 @@ extern vlib_node_registration_t tcp4_rcv_process_node;
extern vlib_node_registration_t tcp6_rcv_process_node;
extern vlib_node_registration_t tcp4_listen_node;
extern vlib_node_registration_t tcp6_listen_node;
+extern vlib_node_registration_t tcp4_input_nolookup_node;
+extern vlib_node_registration_t tcp6_input_nolookup_node;
+extern vlib_node_registration_t tcp4_drop_node;
+extern vlib_node_registration_t tcp6_drop_node;
#define tcp_cfg tcp_main.cfg
#define tcp_node_index(node_id, is_ip4) \
@@ -313,8 +329,8 @@ u32 tcp_snd_space (tcp_connection_t * tc);
int tcp_fastrecovery_prr_snd_space (tcp_connection_t * tc);
void tcp_reschedule (tcp_connection_t * tc);
fib_node_index_t tcp_lookup_rmt_in_fib (tcp_connection_t * tc);
-u32 tcp_session_push_header (transport_connection_t * tconn,
- vlib_buffer_t * b);
+u32 tcp_session_push_header (transport_connection_t *tconn, vlib_buffer_t **b,
+ u32 n_bufs);
int tcp_session_custom_tx (void *conn, transport_send_params_t * sp);
void tcp_connection_timers_init (tcp_connection_t * tc);
@@ -327,6 +343,7 @@ void tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
void tcp_program_cleanup (tcp_worker_ctx_t * wrk, tcp_connection_t * tc);
void tcp_check_gso (tcp_connection_t *tc);
+int tcp_buffer_make_reset (vlib_main_t *vm, vlib_buffer_t *b, u8 is_ip4);
void tcp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add);
int tcp_configure_v4_source_address_range (vlib_main_t * vm,
ip4_address_t * start,
@@ -342,6 +359,7 @@ format_function_t format_tcp_flags;
format_function_t format_tcp_sacks;
format_function_t format_tcp_rcv_sacks;
format_function_t format_tcp_connection;
+format_function_t format_tcp_listener_connection;
format_function_t format_tcp_connection_id;
#define tcp_validate_txf_size(_tc, _a) \