FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
tcp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef _vnet_tcp_h_
17 #define _vnet_tcp_h_
18 
19 #include <vnet/vnet.h>
20 #include <vnet/ip/ip.h>
21 #include <vnet/session/session.h>
22 #include <vnet/tcp/tcp_types.h>
23 #include <vnet/tcp/tcp_timer.h>
24 #include <vnet/tcp/tcp_debug.h>
25 #include <vnet/tcp/tcp_sack.h>
26 #include <vnet/tcp/tcp_bt.h>
27 #include <vnet/tcp/tcp_cc.h>
28 
30 
34 
35 typedef enum _tcp_error
36 {
37 #define tcp_error(n,s) TCP_ERROR_##n,
38 #include <vnet/tcp/tcp_error.def>
39 #undef tcp_error
41 } tcp_error_t;
42 
43 typedef struct _tcp_lookup_dispatch
44 {
45  u8 next, error;
47 
48 #define foreach_tcp_wrk_stat \
49  _(timer_expirations, u64, "timer expirations") \
50  _(rxt_segs, u64, "segments retransmitted") \
51  _(tr_events, u32, "timer retransmit events") \
52  _(to_closewait, u32, "timeout close-wait") \
53  _(to_closewait2, u32, "timeout close-wait w/data") \
54  _(to_finwait1, u32, "timeout fin-wait-1") \
55  _(to_finwait2, u32, "timeout fin-wait-2") \
56  _(to_lastack, u32, "timeout last-ack") \
57  _(to_closing, u32, "timeout closing") \
58  _(tr_abort, u32, "timer retransmit abort") \
59  _(rst_unread, u32, "reset on close due to unread data") \
60  _(no_buffer, u32, "out of buffers") \
61 
62 typedef struct tcp_wrk_stats_
63 {
64 #define _(name, type, str) type name;
66 #undef _
68 
69 typedef struct tcp_free_req_
70 {
74 
75 typedef struct tcp_worker_ctx_
76 {
77  CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
78 
79  /** worker's pool of connections */
81 
82  /** vector of pending ack dequeues */
84 
85  /** vector of pending disconnect notifications */
87 
88  /** vector of pending reset notifications */
90 
91  /** convenience pointer to this thread's vlib main */
93 
94  /** Time used for high precision (us) measurements in seconds */
96 
97  /** Time measured in @ref TCP_TSTAMP_TICK used for time stamps */
99 
100  /* Max timers to be handled per dispatch loop */
102 
103  /* Fifo of pending timer expirations */
105 
106  CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
107 
108  /** cached 'on the wire' options for bursts */
110 
111  /** tx buffer free list */
113 
114  /* fifo of pending free requests */
116 
117  /** Session layer edge indices to tcp output */
119 
120  /** worker timer wheel */
122 
123  CLIB_CACHE_LINE_ALIGN_MARK (cacheline2);
124 
127 
128 #define tcp_worker_stats_inc(_wrk,_stat,_val) \
129  _wrk->stats._stat += _val
130 
131 typedef struct tcp_iss_seed_
132 {
136 
137 typedef struct tcp_configuration_
138 {
139  /** Max rx fifo size for a session (in bytes). It is used in to compute the
140  * rfc 7323 window scaling factor */
142 
143  /** Min rx fifo for a session (in bytes) */
145 
146  /** Default MTU to be used when establishing connections */
148 
149  /** Initial CWND multiplier, which multiplies MSS to determine initial CWND.
150  * Set 0 to determine the initial CWND by another way */
152 
153  /** Enable tx pacing for new connections */
155 
156  /** Allow use of TSO whenever available */
158 
159  /** Set if csum offloading is enabled */
161 
162  /** Default congestion control algorithm type */
164 
165  /** Min rwnd, as number of snd_mss segments, for update ack to be sent after
166  * a zero rwnd advertisement */
168 
169  /** Timer ticks to wait for close from app */
171 
172  /** Timer ticks to wait in time-wait. Also known as 2MSL */
174 
175  /** Timer ticks to wait in fin-wait1 to send fin and rcv fin-ack */
177 
178  /** Timer ticks to wait in last ack for ack */
180 
181  /** Timer ticks to wait in fin-wait2 for fin */
183 
184  /** Timer ticks to wait in closing for fin ack */
186 
187  /** Timer ticks to wait for free buffer */
189 
190  /** Time to wait (sec) before cleaning up the connection */
192 
193  /** Number of preallocated connections */
195 
196  /** Maxium allowed GSO packet size */
198 
199  /** Vectors of src addresses. Optional unless one needs > 63K active-opens */
201  ip6_address_t *ip6_src_addrs;
202 
203  /** Fault-injection. Debug only */
206 
207 typedef struct _tcp_main
208 {
209  /** per-worker context */
210  tcp_worker_ctx_t *wrk_ctx;
211 
212  /* Pool of listeners. */
213  tcp_connection_t *listener_pool;
214 
215  /** vlib buffer size */
216  u32 bytes_per_buffer;
217 
218  /** Session layer edge indices to ip lookup (syns, rst) */
219  u32 ipl_next_node[2];
220 
221  /** Dispatch table by state and flags */
222  tcp_lookup_dispatch_t dispatch_table[TCP_N_STATES][64];
223 
224  /** Seed used to generate random iss */
225  tcp_iss_seed_t iss_seed;
226 
227  /** Congestion control algorithms registered */
228  tcp_cc_algorithm_t *cc_algos;
229 
230  /** Hash table of cc algorithms by name */
231  uword *cc_algo_by_name;
232 
233  /** Last cc algo registered */
234  tcp_cc_algorithm_type_e cc_last_type;
235 
236  /** Flag that indicates if stack is on or off */
237  u8 is_enabled;
238 
239  /** Flag that indicates if v4 punting is enabled */
240  u8 punt_unknown4;
241 
242  /** Flag that indicates if v6 punting is enabled */
243  u8 punt_unknown6;
244 
245  /** Rotor for v4 source addresses */
246  u32 last_v4_addr_rotor;
247 
248  /** Rotor for v6 source addresses */
249  u32 last_v6_addr_rotor;
250 
251  /** Protocol configuration */
253 
254  /** message ID base for API */
256 } tcp_main_t;
257 
258 extern tcp_main_t tcp_main;
271 
272 #define tcp_cfg tcp_main.cfg
273 #define tcp_node_index(node_id, is_ip4) \
274  ((is_ip4) ? tcp4_##node_id##_node.index : tcp6_##node_id##_node.index)
275 
278 {
279  return &tcp_main;
280 }
281 
284 {
285  ASSERT (thread_index < vec_len (tcp_main.wrk_ctx));
286  return &tcp_main.wrk_ctx[thread_index];
287 }
288 
291  tcp_connection_t **base);
297 
299  u32 thread_index, u8 is_ip4);
300 void tcp_send_reset (tcp_connection_t * tc);
301 void tcp_send_syn (tcp_connection_t * tc);
303 void tcp_send_fin (tcp_connection_t * tc);
304 void tcp_send_ack (tcp_connection_t * tc);
306 
310 
314 void tcp_reschedule (tcp_connection_t * tc);
317  vlib_buffer_t * b);
318 int tcp_session_custom_tx (void *conn, transport_send_params_t * sp);
319 
326  u32 start_bucket);
329 
330 void tcp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add);
332  ip4_address_t * start,
335  ip6_address_t * start,
336  ip6_address_t * end, u32 table_id);
337 
339 
346 
347 #define tcp_validate_txf_size(_tc, _a) \
348  ASSERT(_tc->state != TCP_STATE_ESTABLISHED \
349  || transport_max_tx_dequeue (&_tc->connection) >= _a)
350 
351 #endif /* _vnet_tcp_h_ */
352 
353 /*
354  * fd.io coding-style-patch-verification: ON
355  *
356  * Local Variables:
357  * eval: (c-set-style "gnu")
358  * End:
359  */
tcp_configuration_
Definition: tcp.h:137
tcp_connection_alloc_w_base
tcp_connection_t * tcp_connection_alloc_w_base(u8 thread_index, tcp_connection_t **base)
Definition: tcp.c:300
tcp_send_reset_w_pkt
void tcp_send_reset_w_pkt(tcp_connection_t *tc, vlib_buffer_t *pkt, u32 thread_index, u8 is_ip4)
Send reset without reusing existing buffer.
Definition: tcp_output.c:656
tcp_connection_close
void tcp_connection_close(tcp_connection_t *tc)
Begin connection closing procedure.
Definition: tcp.c:360
tcp_worker_ctx_::time_tstamp
u32 time_tstamp
Time measured in TCP_TSTAMP_TICK used for time stamps.
Definition: tcp.h:98
tcp_lookup_rmt_in_fib
fib_node_index_t tcp_lookup_rmt_in_fib(tcp_connection_t *tc)
tcp_half_open_connection_cleanup
int tcp_half_open_connection_cleanup(tcp_connection_t *tc)
Try to cleanup half-open connection.
Definition: tcp.c:212
tcp_configuration_::finwait2_time
u32 finwait2_time
Timer ticks to wait in fin-wait2 for fin.
Definition: tcp.h:182
thread_index
u32 thread_index
Definition: nat44_ei_hairpinning.c:495
foreach_tcp_wrk_stat
#define foreach_tcp_wrk_stat
Definition: tcp.h:48
tcp_configuration_::max_gso_size
u32 max_gso_size
Maxium allowed GSO packet size.
Definition: tcp.h:197
tcp_connection_del
void tcp_connection_del(tcp_connection_t *tc)
Connection removal.
Definition: tcp.c:280
tcp_connection_cleanup
void tcp_connection_cleanup(tcp_connection_t *tc)
Cleans up connection state.
Definition: tcp.c:233
tcp_connection_timers_reset
void tcp_connection_timers_reset(tcp_connection_t *tc)
Stop all connection timers.
Definition: tcp.c:517
format_tcp_state
format_function_t format_tcp_state
Definition: tcp.h:340
tcp_worker_ctx_::pending_deq_acked
u32 * pending_deq_acked
vector of pending ack dequeues
Definition: tcp.h:83
tcp_init_snd_vars
void tcp_init_snd_vars(tcp_connection_t *tc)
Initialize connection send variables.
Definition: tcp.c:694
tcp6_output_node
vlib_node_registration_t tcp6_output_node
(constructor) VLIB_REGISTER_NODE (tcp6_output_node)
Definition: tcp_output.c:2304
tcp_configuration_t
struct tcp_configuration_ tcp_configuration_t
tcp_sack.h
tcp_configuration_::default_mtu
u16 default_mtu
Default MTU to be used when establishing connections.
Definition: tcp.h:147
tcp_send_synack
void tcp_send_synack(tcp_connection_t *tc)
Definition: tcp_output.c:819
tcp_send_ack
void tcp_send_ack(tcp_connection_t *tc)
Definition: tcp_output.c:999
next
u16 * next
Definition: nat44_ei_out2in.c:718
tcp_cleanup_req_t
struct tcp_free_req_ tcp_cleanup_req_t
tcp_configuration_::max_rx_fifo
u32 max_rx_fifo
Max rx fifo size for a session (in bytes).
Definition: tcp.h:141
tcp_connection_t
struct _tcp_connection tcp_connection_t
tcp_connection_alloc
tcp_connection_t * tcp_connection_alloc(u8 thread_index)
Definition: tcp.c:287
tcp_configuration_::initial_cwnd_multiplier
u16 initial_cwnd_multiplier
Initial CWND multiplier, which multiplies MSS to determine initial CWND.
Definition: tcp.h:151
wrk
session_worker_t * wrk
Definition: application.c:490
vnet_get_tcp_main
static tcp_main_t * vnet_get_tcp_main()
Definition: tcp.h:277
tcp_configuration_::enable_tx_pacing
u8 enable_tx_pacing
Enable tx pacing for new connections.
Definition: tcp.h:154
tcp_timer_persist_handler
timer_expiration_handler tcp_timer_persist_handler
tcp_get_worker
static tcp_worker_ctx_t * tcp_get_worker(u32 thread_index)
Definition: tcp.h:283
u16
unsigned short u16
Definition: types.h:57
f32
float f32
Definition: types.h:143
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
tcp_free_req_
Definition: tcp.h:69
tcp_configuration_::min_rx_fifo
u32 min_rx_fifo
Min rx fifo for a session (in bytes)
Definition: tcp.h:144
format_tcp_connection
format_function_t format_tcp_connection
Definition: tcp.h:344
transport_connection_t
struct _transport_connection transport_connection_t
tcp_lookup_dispatch_t
struct _tcp_lookup_dispatch tcp_lookup_dispatch_t
tcp_worker_ctx_::pending_disconnects
u32 * pending_disconnects
vector of pending disconnect notifications
Definition: tcp.h:86
tcp4_input_node
vlib_node_registration_t tcp4_input_node
(constructor) VLIB_REGISTER_NODE (tcp4_input_node)
Definition: tcp_input.c:3049
error
Definition: cJSON.c:88
tcp_main_t
struct _tcp_main tcp_main_t
clib_time_type_t
f64 clib_time_type_t
Definition: time.h:203
tcp_worker_ctx_::max_timers_per_loop
u32 max_timers_per_loop
Definition: tcp.h:101
format_tcp_rcv_sacks
format_function_t format_tcp_rcv_sacks
Definition: tcp.h:343
msg_id_base
static u16 msg_id_base
Definition: bond_api.c:36
tcp_worker_ctx_::pending_resets
u32 * pending_resets
vector of pending reset notifications
Definition: tcp.h:89
tcp_worker_ctx_::timer_wheel
tcp_timer_wheel_t timer_wheel
worker timer wheel
Definition: tcp.h:121
tcp_configuration_::ip6_src_addrs
ip6_address_t * ip6_src_addrs
Definition: tcp.h:201
tcp_program_cleanup
void tcp_program_cleanup(tcp_worker_ctx_t *wrk, tcp_connection_t *tc)
Definition: tcp.c:336
tcp_worker_ctx_::CLIB_CACHE_LINE_ALIGN_MARK
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
tcp_configuration_::cc_algo
tcp_cc_algorithm_type_e cc_algo
Default congestion control algorithm type.
Definition: tcp.h:163
tcp4_output_node
vlib_node_registration_t tcp4_output_node
(constructor) VLIB_REGISTER_NODE (tcp4_output_node)
Definition: tcp_output.c:2284
tcp_worker_ctx_::tco_next_node
u32 tco_next_node[2]
Session layer edge indices to tcp output.
Definition: tcp.h:118
tcp_send_window_update_ack
void tcp_send_window_update_ack(tcp_connection_t *tc)
Send window update ack.
Definition: tcp_output.c:1058
tcp_iss_seed_t
struct tcp_iss_seed_ tcp_iss_seed_t
tcp_check_gso
void tcp_check_gso(tcp_connection_t *tc)
Definition: tcp_input.c:3090
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
tcp_configure_v4_source_address_range
int tcp_configure_v4_source_address_range(vlib_main_t *vm, ip4_address_t *start, ip4_address_t *end, u32 table_id)
Configure an ipv4 source address range.
Definition: tcp_cli.c:377
tcp_configuration_::cleanup_time
f32 cleanup_time
Time to wait (sec) before cleaning up the connection.
Definition: tcp.h:191
tcp_worker_ctx_::tx_buffers
u32 * tx_buffers
tx buffer free list
Definition: tcp.h:112
tcp_error_t
enum _tcp_error tcp_error_t
tcp_send_syn
void tcp_send_syn(tcp_connection_t *tc)
Send SYN.
Definition: tcp_output.c:783
vnet_tcp_enable_disable
clib_error_t * vnet_tcp_enable_disable(vlib_main_t *vm, u8 is_en)
Definition: tcp.c:1537
tcp6_listen_node
vlib_node_registration_t tcp6_listen_node
(constructor) VLIB_REGISTER_NODE (tcp6_listen_node)
Definition: tcp_input.c:2740
tcp_worker_ctx_::connections
tcp_connection_t * connections
worker's pool of connections
Definition: tcp.h:80
tcp_main
tcp_main_t tcp_main
Definition: tcp.c:28
format_tcp_connection_id
format_function_t format_tcp_connection_id
Definition: tcp.h:345
end
f64 end
end of the time range
Definition: mactime.api:44
tcp_cc_algorithm_type_e
enum _tcp_cc_algorithm_type tcp_cc_algorithm_type_e
format_tcp_flags
format_function_t format_tcp_flags
Definition: tcp.h:341
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
tcp_configuration_::allow_tso
u8 allow_tso
Allow use of TSO whenever available.
Definition: tcp.h:157
uword
u64 uword
Definition: types.h:112
tcp4_syn_sent_node
vlib_node_registration_t tcp4_syn_sent_node
(constructor) VLIB_REGISTER_NODE (tcp4_syn_sent_node)
Definition: tcp_input.c:2066
tcp_worker_ctx_::cached_opts
u8 cached_opts[40]
cached 'on the wire' options for bursts
Definition: tcp.h:109
tcp_wrk_stats_
Definition: tcp.h:62
f64
double f64
Definition: types.h:142
tcp_worker_ctx_::time_us
f64 time_us
Time used for high precision (us) measurements in seconds.
Definition: tcp.h:95
tcp_iss_seed_::first
u64 first
Definition: tcp.h:133
tcp_program_ack
void tcp_program_ack(tcp_connection_t *tc)
Definition: tcp_output.c:1019
tcp_program_dupack
void tcp_program_dupack(tcp_connection_t *tc)
Definition: tcp_output.c:1029
tcp_iss_seed_::second
u64 second
Definition: tcp.h:134
tcp_connection_tx_pacer_reset
void tcp_connection_tx_pacer_reset(tcp_connection_t *tc, u32 window, u32 start_bucket)
Definition: tcp.c:1380
ip4_address_t
Definition: ip4_packet.h:50
tcp4_established_node
vlib_node_registration_t tcp4_established_node
(constructor) VLIB_REGISTER_NODE (tcp4_established_node)
Definition: tcp_input.c:1572
tcp6_input_node
vlib_node_registration_t tcp6_input_node
(constructor) VLIB_REGISTER_NODE (tcp6_input_node)
Definition: tcp_input.c:3069
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
tcp6_rcv_process_node
vlib_node_registration_t tcp6_rcv_process_node
(constructor) VLIB_REGISTER_NODE (tcp6_rcv_process_node)
Definition: tcp_input.c:2550
tcp_configuration_::preallocated_connections
u32 preallocated_connections
Number of preallocated connections.
Definition: tcp.h:194
tcp_punt_unknown
void tcp_punt_unknown(vlib_main_t *vm, u8 is_ip4, u8 is_add)
Definition: tcp.c:1555
tcp_update_burst_snd_vars
void tcp_update_burst_snd_vars(tcp_connection_t *tc)
Update burst send vars.
Definition: tcp_output.c:300
tcp_program_retransmit
void tcp_program_retransmit(tcp_connection_t *tc)
Definition: tcp_output.c:1041
transport_send_params_
Definition: transport.h:45
tcp_configuration_::csum_offload
u8 csum_offload
Set if csum offloading is enabled.
Definition: tcp.h:160
tcp_send_reset
void tcp_send_reset(tcp_connection_t *tc)
Build and set reset packet for connection.
Definition: tcp_output.c:739
tcp6_syn_sent_node
vlib_node_registration_t tcp6_syn_sent_node
(constructor) VLIB_REGISTER_NODE (tcp6_syn_sent_node)
Definition: tcp_input.c:2085
format_function_t
u8 *() format_function_t(u8 *s, va_list *args)
Definition: format.h:48
tcp_configuration_::finwait1_time
u32 finwait1_time
Timer ticks to wait in fin-wait1 to send fin and rcv fin-ack.
Definition: tcp.h:176
always_inline
#define always_inline
Definition: rdma_mlx5dv.h:23
tcp_configuration_::alloc_err_timeout
u32 alloc_err_timeout
Timer ticks to wait for free buffer.
Definition: tcp.h:188
tcp_connection_free
void tcp_connection_free(tcp_connection_t *tc)
Definition: tcp.c:323
tcp4_rcv_process_node
vlib_node_registration_t tcp4_rcv_process_node
(constructor) VLIB_REGISTER_NODE (tcp4_rcv_process_node)
Definition: tcp_input.c:2531
u64
unsigned long u64
Definition: types.h:89
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
tcp_configuration_::lastack_time
u32 lastack_time
Timer ticks to wait in last ack for ack.
Definition: tcp.h:179
ip.h
u32
unsigned int u32
Definition: types.h:88
tcp_worker_ctx_t
struct tcp_worker_ctx_ tcp_worker_ctx_t
table_id
u32 table_id
Definition: wireguard.api:102
TCP_N_ERROR
@ TCP_N_ERROR
Definition: tcp.h:40
tcp_cc.h
tcp_session_custom_tx
int tcp_session_custom_tx(void *conn, transport_send_params_t *sp)
Definition: tcp_output.c:1994
timer_expiration_handler
void() timer_expiration_handler(tcp_connection_t *tc)
Definition: tcp.h:29
tcp_connection_tx_pacer_update
void tcp_connection_tx_pacer_update(tcp_connection_t *tc)
Definition: tcp.c:1367
tcp_free_req_::free_time
clib_time_type_t free_time
Definition: tcp.h:71
tcp6_established_node
vlib_node_registration_t tcp6_established_node
(constructor) VLIB_REGISTER_NODE (tcp6_established_node)
Definition: tcp_input.c:1591
vlib_main_t
Definition: main.h:102
tcp_cc_algorithm_t
struct _tcp_cc_algorithm tcp_cc_algorithm_t
Definition: tcp_types.h:253
tcp_configuration_::closing_time
u32 closing_time
Timer ticks to wait in closing for fin ack.
Definition: tcp.h:185
b
vlib_buffer_t ** b
Definition: nat44_ei_out2in.c:717
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
tcp_worker_ctx_::vm
vlib_main_t * vm
convenience pointer to this thread's vlib main
Definition: tcp.h:92
tcp_reschedule
void tcp_reschedule(tcp_connection_t *tc)
Definition: tcp.c:1391
tcp_free_req_::connection_index
u32 connection_index
Definition: tcp.h:72
tcp_configuration_::timewait_time
u32 timewait_time
Timer ticks to wait in time-wait.
Definition: tcp.h:173
tcp_iss_seed_
Definition: tcp.h:131
tcp_wrk_stats_t
struct tcp_wrk_stats_ tcp_wrk_stats_t
session.h
tcp_session_push_header
u32 tcp_session_push_header(transport_connection_t *tconn, vlib_buffer_t *b)
Definition: tcp_output.c:972
tcp_worker_ctx_::pending_timers
u32 * pending_timers
Definition: tcp.h:104
tcp_error.def
TCP_N_STATES
@ TCP_N_STATES
Definition: tcp_types.h:61
tcp_timer_retransmit_handler
timer_expiration_handler tcp_timer_retransmit_handler
tcp_bt.h
tcp_types.h
tcp_configuration_::buffer_fail_fraction
f64 buffer_fail_fraction
Fault-injection.
Definition: tcp.h:204
tcp_configuration_::ip4_src_addrs
ip4_address_t * ip4_src_addrs
Vectors of src addresses.
Definition: tcp.h:200
tcp_timer_wheel_t
tw_timer_wheel_tcp_twsl_t tcp_timer_wheel_t
Definition: tcp_types.h:475
tcp_timer.h
tcp_connection_timers_init
void tcp_connection_timers_init(tcp_connection_t *tc)
Initialize all connection timers as invalid.
Definition: tcp.c:500
tcp_fastrecovery_prr_snd_space
int tcp_fastrecovery_prr_snd_space(tcp_connection_t *tc)
Estimate send space using proportional rate reduction (RFC6937)
Definition: tcp_output.c:1634
vnet.h
tcp_timer_retransmit_syn_handler
timer_expiration_handler tcp_timer_retransmit_syn_handler
tcp_snd_space
u32 tcp_snd_space(tcp_connection_t *tc)
Definition: tcp.c:1098
tcp_configuration_::closewait_time
u32 closewait_time
Timer ticks to wait for close from app.
Definition: tcp.h:170
tcp_worker_ctx_
Definition: tcp.h:75
tcp_debug.h
tcp4_listen_node
vlib_node_registration_t tcp4_listen_node
(constructor) VLIB_REGISTER_NODE (tcp4_listen_node)
Definition: tcp_input.c:2721
tcp_worker_ctx_::pending_cleanups
tcp_cleanup_req_t * pending_cleanups
Definition: tcp.h:115
tcp_connection_init_vars
void tcp_connection_init_vars(tcp_connection_t *tc)
Initialize tcp connection variables.
Definition: tcp.c:728
tcp_configuration_::rwnd_min_update_ack
u32 rwnd_min_update_ack
Min rwnd, as number of snd_mss segments, for update ack to be sent after a zero rwnd advertisement.
Definition: tcp.h:167
format_tcp_sacks
format_function_t format_tcp_sacks
Definition: tcp.h:342
tcp_configure_v6_source_address_range
int tcp_configure_v6_source_address_range(vlib_main_t *vm, ip6_address_t *start, ip6_address_t *end, u32 table_id)
Configure an ipv6 source address range.
Definition: tcp_cli.c:464
tcp_send_fin
void tcp_send_fin(tcp_connection_t *tc)
Send FIN.
Definition: tcp_output.c:849
tcp_worker_ctx_::stats
tcp_wrk_stats_t stats
Definition: tcp.h:125
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111