X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.h;h=46d72b74d74844f3e06454cbad7f7f13e8d19802;hb=f65074e4df47d05238e051615dbaf5d2bcbaddf2;hp=7ab7ee681c5e910175a2725b9da2323b33a19813;hpb=31c9955a4e83578422b3328ef0d7b2b248536644;p=vpp.git diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index 7ab7ee681c5..46d72b74d74 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -117,7 +117,6 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler; #define foreach_tcp_connection_flag \ _(SNDACK, "Send ACK") \ _(FINSNT, "FIN sent") \ - _(SENT_RCV_WND0, "Sent 0 rcv_wnd") \ _(RECOVERY, "Recovery") \ _(FAST_RECOVERY, "Fast Recovery") \ _(DCNT_PENDING, "Disconnect pending") \ @@ -127,6 +126,7 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler; _(FRXT_FIRST, "Fast-retransmit first again") \ _(DEQ_PENDING, "Pending dequeue acked") \ _(PSH_PENDING, "PSH pending") \ + _(FINRCVD, "FIN received") \ typedef enum _tcp_connection_flag_bits { @@ -144,26 +144,6 @@ typedef enum _tcp_connection_flag TCP_CONN_N_FLAGS } tcp_connection_flags_e; -/** TCP buffer flags */ -#define foreach_tcp_buf_flag \ - _ (ACK) /**< Sending ACK. */ \ - _ (DUPACK) /**< Sending DUPACK. */ \ - -enum -{ -#define _(f) TCP_BUF_BIT_##f, - foreach_tcp_buf_flag -#undef _ - TCP_N_BUF_BITS, -}; - -enum -{ -#define _(f) TCP_BUF_FLAG_##f = 1 << TCP_BUF_BIT_##f, - foreach_tcp_buf_flag -#undef _ -}; - #define TCP_SCOREBOARD_TRACE (0) #define TCP_MAX_SACK_BLOCKS 256 /**< Max number of SACK blocks stored */ #define TCP_INVALID_SACK_HOLE_INDEX ((u32)~0) @@ -475,6 +455,9 @@ typedef struct _tcp_main /* Seed used to generate random iss */ tcp_iss_seed_t iss_seed; + /** Hash table of cc algorithms by name */ + uword *cc_algo_by_name; + /* * Configuration */ @@ -486,6 +469,9 @@ typedef struct _tcp_main * rfc 7323 window scaling factor */ u32 max_rx_fifo; + /** Default MTU to be used when establishing connections */ + u16 default_mtu; + /** Number of preallocated connections */ u32 preallocated_connections; u32 preallocated_half_open_connections; @@ -515,6 +501,14 @@ extern vlib_node_registration_t tcp4_input_node; extern vlib_node_registration_t tcp6_input_node; extern vlib_node_registration_t tcp4_output_node; extern vlib_node_registration_t tcp6_output_node; +extern vlib_node_registration_t tcp4_established_node; +extern vlib_node_registration_t tcp6_established_node; +extern vlib_node_registration_t tcp4_syn_sent_node; +extern vlib_node_registration_t tcp6_syn_sent_node; +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; always_inline tcp_main_t * vnet_get_tcp_main () @@ -672,7 +666,7 @@ tcp_flight_size (const tcp_connection_t * tc) { int flight_size; - flight_size = (int) (tc->snd_una_max - tc->snd_una) - tcp_bytes_out (tc) + flight_size = (int) (tc->snd_nxt - tc->snd_una) - tcp_bytes_out (tc) + tc->snd_rxt_bytes; if (flight_size < 0) @@ -812,7 +806,8 @@ tcp_set_time_now (tcp_worker_ctx_t * wrk) return wrk->time_now; } -u32 tcp_push_header (tcp_connection_t * tconn, vlib_buffer_t * b); +u32 tcp_session_push_header (transport_connection_t * tconn, + vlib_buffer_t * b); void tcp_connection_timers_init (tcp_connection_t * tc); void tcp_connection_timers_reset (tcp_connection_t * tc); @@ -915,7 +910,7 @@ tcp_persist_timer_reset (tcp_connection_t * tc) always_inline void tcp_retransmit_timer_update (tcp_connection_t * tc) { - if (tc->snd_una == tc->snd_una_max) + if (tc->snd_una == tc->snd_nxt) { tcp_retransmit_timer_reset (tc); if (tc->snd_wnd < tc->snd_mss)