FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
tcp_types.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 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 SRC_VNET_TCP_TCP_TYPES_H_
17 #define SRC_VNET_TCP_TCP_TYPES_H_
18 
19 #include <vppinfra/clib.h>
20 #include <vppinfra/rbtree.h>
21 #include <vnet/tcp/tcp_packet.h>
22 #include <vnet/session/transport.h>
23 
24 #define TCP_TICK 0.000001 /**< TCP tick period (s) */
25 #define THZ (u32) (1/TCP_TICK) /**< TCP tick frequency */
26 
27 #define TCP_TSTP_TICK 0.001 /**< Timestamp tick (s) */
28 #define TCP_TSTP_HZ (u32) (1/TCP_TSTP_TICK) /**< Timestamp freq */
29 #define TCP_PAWS_IDLE (24 * 86400 * TCP_TSTP_HZ)/**< 24 days */
30 #define TCP_TSTP_TO_HZ (u32) (TCP_TSTP_TICK * THZ)
31 
32 #define TCP_FIB_RECHECK_PERIOD 1 * THZ /**< Recheck every 1s */
33 #define TCP_MAX_OPTION_SPACE 40
34 #define TCP_CC_DATA_SZ 24
35 #define TCP_RXT_MAX_BURST 10
36 
37 #define TCP_DUPACK_THRESHOLD 3
38 #define TCP_IW_N_SEGMENTS 10
39 #define TCP_ALWAYS_ACK 1 /**< On/off delayed acks */
40 #define TCP_USE_SACKS 1 /**< Disable only for testing */
41 
42 /** TCP FSM state definitions as per RFC793. */
43 #define foreach_tcp_fsm_state \
44  _(CLOSED, "CLOSED") \
45  _(LISTEN, "LISTEN") \
46  _(SYN_SENT, "SYN_SENT") \
47  _(SYN_RCVD, "SYN_RCVD") \
48  _(ESTABLISHED, "ESTABLISHED") \
49  _(CLOSE_WAIT, "CLOSE_WAIT") \
50  _(FIN_WAIT_1, "FIN_WAIT_1") \
51  _(LAST_ACK, "LAST_ACK") \
52  _(CLOSING, "CLOSING") \
53  _(FIN_WAIT_2, "FIN_WAIT_2") \
54  _(TIME_WAIT, "TIME_WAIT")
55 
56 typedef enum _tcp_state
57 {
58 #define _(sym, str) TCP_STATE_##sym,
60 #undef _
62 } tcp_state_t;
63 
64 /** TCP timers */
65 #define foreach_tcp_timer \
66  _(RETRANSMIT, "RETRANSMIT") \
67  _(PERSIST, "PERSIST") \
68  _(WAITCLOSE, "WAIT CLOSE") \
69  _(RETRANSMIT_SYN, "RETRANSMIT SYN") \
70 
71 typedef enum _tcp_timers
72 {
73 #define _(sym, str) TCP_TIMER_##sym,
75 #undef _
77 } __clib_packed tcp_timers_e;
78 
79 #define TCP_TIMER_HANDLE_INVALID ((u32) ~0)
80 
81 #define TCP_TIMER_TICK 0.0001 /**< Timer tick in seconds */
82 #define TCP_TO_TIMER_TICK TCP_TICK*10000 /**< Factor for converting
83  ticks to timer ticks */
84 
85 #define TCP_RTO_MAX 60 * THZ /* Min max RTO (60s) as per RFC6298 */
86 #define TCP_RTO_MIN 0.2 * THZ /* Min RTO (200ms) - lower than standard */
87 #define TCP_RTT_MAX 30 * THZ /* 30s (probably too much) */
88 #define TCP_RTO_SYN_RETRIES 3 /* SYN retries without doubling RTO */
89 #define TCP_RTO_INIT 1 * THZ /* Initial retransmit timer */
90 #define TCP_RTO_BOFF_MAX 8 /* Max number of retries before reset */
91 #define TCP_ESTABLISH_TIME (60 * THZ) /* Connection establish timeout */
92 
93 /** Connection configuration flags */
94 #define foreach_tcp_cfg_flag \
95  _(RATE_SAMPLE, "Rate sampling") \
96  _(NO_CSUM_OFFLOAD, "No csum offload") \
97  _(NO_TSO, "TSO off") \
98  _(TSO, "TSO") \
99  _(NO_ENDPOINT,"No endpoint") \
100 
101 typedef enum tcp_cfg_flag_bits_
102 {
103 #define _(sym, str) TCP_CFG_F_##sym##_BIT,
105 #undef _
108 
109 typedef enum tcp_cfg_flag_
110 {
111 #define _(sym, str) TCP_CFG_F_##sym = 1 << TCP_CFG_F_##sym##_BIT,
113 #undef _
116 
117 /** TCP connection flags */
118 #define foreach_tcp_connection_flag \
119  _(SNDACK, "Send ACK") \
120  _(FINSNT, "FIN sent") \
121  _(RECOVERY, "Recovery") \
122  _(FAST_RECOVERY, "Fast Recovery") \
123  _(DCNT_PENDING, "Disconnect pending") \
124  _(HALF_OPEN_DONE, "Half-open completed") \
125  _(FINPNDG, "FIN pending") \
126  _(RXT_PENDING, "Retransmit pending") \
127  _(FRXT_FIRST, "Retransmit first") \
128  _(DEQ_PENDING, "Dequeue pending ") \
129  _(PSH_PENDING, "PSH pending") \
130  _(FINRCVD, "FIN received") \
131  _(ZERO_RWND_SENT, "Zero RWND sent") \
132 
134 {
135 #define _(sym, str) TCP_CONN_##sym##_BIT,
137 #undef _
140 
142 {
143 #define _(sym, str) TCP_CONN_##sym = 1 << TCP_CONN_##sym##_BIT,
145 #undef _
148 
149 #define TCP_SCOREBOARD_TRACE (0)
150 #define TCP_MAX_SACK_BLOCKS 255 /**< Max number of SACK blocks stored */
151 #define TCP_INVALID_SACK_HOLE_INDEX ((u32)~0)
152 #define TCP_MAX_SACK_REORDER 300
153 
154 typedef struct _scoreboard_trace_elt
155 {
156  u32 start;
157  u32 end;
158  u32 ack;
159  u32 snd_nxt;
160  u32 group;
162 
163 typedef struct _sack_scoreboard_hole
164 {
165  u32 next; /**< Index for next entry in linked list */
166  u32 prev; /**< Index for previous entry in linked list */
167  u32 start; /**< Start sequence number */
168  u32 end; /**< End sequence number */
169  u8 is_lost; /**< Mark hole as lost */
171 
172 typedef struct _sack_scoreboard
173 {
174  sack_scoreboard_hole_t *holes; /**< Pool of holes */
175  u32 head; /**< Index of first entry */
176  u32 tail; /**< Index of last entry */
177  u32 sacked_bytes; /**< Number of bytes sacked in sb */
178  u32 last_sacked_bytes; /**< Number of bytes last sacked */
179  u32 last_bytes_delivered; /**< Sack bytes delivered to app */
180  u32 rxt_sacked; /**< Rxt bytes last delivered */
181  u32 high_sacked; /**< Highest byte sacked (fack) */
182  u32 high_rxt; /**< Highest retransmitted sequence */
183  u32 rescue_rxt; /**< Rescue sequence number */
184  u32 lost_bytes; /**< Bytes lost as per RFC6675 */
185  u32 last_lost_bytes; /**< Number of bytes last lost */
186  u32 cur_rxt_hole; /**< Retransmitting from this hole */
187  u32 reorder; /**< Estimate of segment reordering */
188  u8 is_reneging; /**< Flag set if peer is reneging*/
189 
190 #if TCP_SCOREBOARD_TRACE
192 #endif
193 
195 
196 #define TCP_BTS_INVALID_INDEX ((u32)~0)
197 
198 typedef enum tcp_bts_flags_
199 {
204 } __clib_packed tcp_bts_flags_t;
205 
206 typedef struct tcp_bt_sample_
207 {
208  u32 next; /**< Next sample index in list */
209  u32 prev; /**< Previous sample index in list */
210  u32 min_seq; /**< Min seq number in sample */
211  u32 max_seq; /**< Max seq number. Set for rxt samples */
212  u64 delivered; /**< Total delivered bytes for sample */
213  f64 delivered_time; /**< Delivered time when sample taken */
214  f64 tx_time; /**< Transmit time for the burst */
215  f64 first_tx_time; /**< Connection first tx time at tx */
216  u64 tx_in_flight; /**< In flight at tx time */
217  u64 tx_lost; /**< Lost at tx time */
218  tcp_bts_flags_t flags; /**< Sample flag */
220 
221 typedef struct tcp_rate_sample_
222 {
223  u64 prior_delivered; /**< Delivered of sample used for rate, i.e.,
224  total bytes delivered at prior_time */
225  f64 prior_time; /**< Delivered time of sample used for rate */
226  f64 interval_time; /**< Time to ack the bytes delivered */
227  f64 rtt_time; /**< RTT for sample */
228  u64 tx_in_flight; /**< In flight at (re)transmit time */
229  u64 tx_lost; /**< Lost over interval */
230  u32 delivered; /**< Bytes delivered in interval_time */
231  u32 acked_and_sacked; /**< Bytes acked + sacked now */
232  u32 last_lost; /**< Bytes lost now */
233  u32 lost; /**< Number of bytes lost over interval */
234  tcp_bts_flags_t flags; /**< Rate sample flags from bt sample */
236 
237 typedef struct tcp_byte_tracker_
238 {
239  tcp_bt_sample_t *samples; /**< Pool of samples */
240  rb_tree_t sample_lookup; /**< Rbtree for sample lookup by min_seq */
241  u32 head; /**< Head of samples linked list */
242  u32 tail; /**< Tail of samples linked list */
243  u32 last_ooo; /**< Cached last ooo sample */
245 
246 typedef enum _tcp_cc_algorithm_type
247 {
252 
253 typedef struct _tcp_cc_algorithm tcp_cc_algorithm_t;
254 
255 typedef enum _tcp_cc_ack_t
256 {
260 } tcp_cc_ack_t;
261 
262 typedef enum tcp_cc_event_
263 {
266 
267 /*
268  * As per RFC4898 tcpEStatsStackSoftErrors
269  */
270 typedef struct tcp_errors_
271 {
272  u32 below_data_wnd; /**< All data in seg is below snd_una */
273  u32 above_data_wnd; /**< Some data in segment is above snd_wnd */
274  u32 below_ack_wnd; /**< Acks for data below snd_una */
275  u32 above_ack_wnd; /**< Acks for data not sent */
276 } tcp_errors_t;
277 
278 typedef struct _tcp_connection
279 {
280  CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
281  transport_connection_t connection; /**< Common transport data. First! */
282 
283  u8 state; /**< TCP state as per tcp_state_t */
284  u8 cfg_flags; /**< Connection configuration flags */
285  u16 flags; /**< Connection flags (see tcp_conn_flags_e) */
286  u32 timers[TCP_N_TIMERS]; /**< Timer handles into timer wheel */
287  u32 pending_timers; /**< Expired timers not yet handled */
288 
289  u64 segs_in; /** RFC4022/4898 tcpHCInSegs/tcpEStatsPerfSegsIn */
290  u64 bytes_in; /** RFC4898 tcpEStatsPerfHCDataOctetsIn */
291  u64 segs_out; /** RFC4898 tcpEStatsPerfSegsOut */
292  u64 bytes_out; /** RFC4898 tcpEStatsPerfHCDataOctetsOut */
293 
294  /** Send sequence variables RFC793 */
295  u32 snd_una; /**< oldest unacknowledged sequence number */
296  u32 snd_wnd; /**< send window */
297  u32 snd_wl1; /**< seq number used for last snd.wnd update */
298  u32 snd_wl2; /**< ack number used for last snd.wnd update */
299  u32 snd_nxt; /**< next seq number to be sent */
300  u16 snd_mss; /**< Effective send max seg (data) size */
301 
302  u64 data_segs_in; /** RFC4898 tcpEStatsPerfDataSegsIn */
303  u64 data_segs_out; /** RFC4898 tcpEStatsPerfDataSegsOut */
304 
305  /** Receive sequence variables RFC793 */
306  u32 rcv_nxt; /**< next sequence number expected */
307  u32 rcv_wnd; /**< receive window we expect */
308 
309  u32 rcv_las; /**< rcv_nxt at last ack sent/rcv_wnd update */
310 
311  /* Options */
312  u8 snd_opts_len; /**< Tx options len */
313  u8 snd_sack_pos; /**< Position in vec of first block to send */
314  u8 rcv_wscale; /**< Window scale to advertise to peer */
315  u8 snd_wscale; /**< Window scale to use when sending */
316  u32 tsval_recent; /**< Last timestamp received */
317  u32 tsval_recent_age; /**< When last updated tstamp_recent*/
318  u32 timestamp_delta; /**< Offset for timestamp */
319  tcp_options_t snd_opts; /**< Tx options for connection */
320  tcp_options_t rcv_opts; /**< Rx options for connection */
321 
322  sack_block_t *snd_sacks; /**< Vector of SACKs to send. XXX Fixed size? */
323  sack_block_t *snd_sacks_fl; /**< Vector for building new list */
324  sack_scoreboard_t sack_sb; /**< SACK "scoreboard" that tracks holes */
325 
326  u16 rcv_dupacks; /**< Number of recent DUPACKs received */
327  u32 dupacks_in; /**< RFC4898 tcpEStatsStackDupAcksIn*/
328  u8 pending_dupacks; /**< Number of DUPACKs to be sent */
329  u32 dupacks_out; /**< RFC4898 tcpEStatsPathDupAcksOut */
330 
331  /* Congestion control */
332  u32 cwnd; /**< Congestion window */
333  u32 cwnd_acc_bytes; /**< Bytes accumulated for cwnd increment */
334  u32 ssthresh; /**< Slow-start threshold */
335  u32 prev_ssthresh; /**< ssthresh before congestion */
336  u32 prev_cwnd; /**< ssthresh before congestion */
337  u32 bytes_acked; /**< Bytes acknowledged by current segment */
338  u32 burst_acked; /**< Bytes acknowledged in current burst */
339  u32 snd_rxt_bytes; /**< Retransmitted bytes during current cc event */
340  u32 snd_rxt_ts; /**< Timestamp when first packet is retransmitted */
341  u32 prr_delivered; /**< RFC6937 bytes delivered during current event */
342  u32 prr_start; /**< snd_una when prr starts */
343  u32 rxt_delivered; /**< Rxt bytes delivered during current cc event */
344  u32 rxt_head; /**< snd_una last time we re rxted the head */
345  u32 tsecr_last_ack; /**< Timestamp echoed to us in last healthy ACK */
346  u32 snd_congestion; /**< snd_nxt when congestion is detected */
347  u32 tx_fifo_size; /**< Tx fifo size. Used to constrain cwnd */
348  tcp_cc_algorithm_t *cc_algo; /**< Congestion control algorithm */
349  u8 cc_data[TCP_CC_DATA_SZ]; /**< Congestion control algo private data */
350 
351  u32 fr_occurences; /**< fast-retransmit occurrences RFC4898
352  tcpEStatsStackFastRetran */
353  u32 tr_occurences; /**< timer-retransmit occurrences */
354  u64 bytes_retrans; /**< RFC4898 tcpEStatsPerfOctetsRetrans */
355  u64 segs_retrans; /**< RFC4898 tcpEStatsPerfSegsRetrans*/
356 
357  /* RTT and RTO */
358  u32 rto; /**< Retransmission timeout */
359  u32 rto_boff; /**< Index for RTO backoff */
360  u32 srtt; /**< Smoothed RTT measured in @ref TCP_TICK */
361  u32 rttvar; /**< Smoothed mean RTT difference. Approximates variance */
362  u32 rtt_seq; /**< Sequence number for tracked ACK */
363  f64 rtt_ts; /**< Timestamp for tracked ACK */
364  f64 mrtt_us; /**< High precision mrtt from tracked acks */
365 
366  u32 psh_seq; /**< Add psh header for seg that includes this */
367  u32 next_node_index; /**< Can be used to control next node in output */
368  u32 next_node_opaque; /**< Opaque to pass to next node */
369  u32 limited_transmit; /**< snd_nxt when limited transmit starts */
370  u32 sw_if_index; /**< Interface for the connection */
371 
372  /* Delivery rate estimation */
373  u64 delivered; /**< Total bytes delivered to peer */
374  u64 app_limited; /**< Delivered when app-limited detected */
375  f64 delivered_time; /**< Time last bytes were acked */
376  f64 first_tx_time; /**< Send time for recently delivered/sent */
377  u64 lost; /**< Total bytes lost */
378  tcp_byte_tracker_t *bt; /**< Tx byte tracker */
379 
380  tcp_errors_t errors; /**< Soft connection errors */
381 
382  u32 iss; /**< initial sent sequence */
383  u32 irs; /**< initial remote sequence */
384  f64 start_ts; /**< Timestamp when connection initialized */
385  u32 last_fib_check; /**< Last time we checked fib route for peer */
386  u16 mss; /**< Our max seg size that includes options */
387  u32 ipv6_flow_label; /**< flow label for ipv6 header */
388 
389 #define rst_state snd_wl1
391 
392 /* *INDENT-OFF* */
393 struct _tcp_cc_algorithm
394 {
395  const char *name;
396  uword (*unformat_cfg) (unformat_input_t * input);
397  void (*init) (tcp_connection_t * tc);
398  void (*cleanup) (tcp_connection_t * tc);
399  void (*rcv_ack) (tcp_connection_t * tc, tcp_rate_sample_t *rs);
400  void (*rcv_cong_ack) (tcp_connection_t * tc, tcp_cc_ack_t ack,
401  tcp_rate_sample_t *rs);
402  void (*congestion) (tcp_connection_t * tc);
403  void (*loss) (tcp_connection_t * tc);
404  void (*recovered) (tcp_connection_t * tc);
405  void (*undo_recovery) (tcp_connection_t * tc);
406  void (*event) (tcp_connection_t *tc, tcp_cc_event_t evt);
407  u64 (*get_pacing_rate) (tcp_connection_t *tc);
408 };
409 /* *INDENT-ON* */
410 
411 #define tcp_fastrecovery_on(tc) (tc)->flags |= TCP_CONN_FAST_RECOVERY
412 #define tcp_fastrecovery_off(tc) (tc)->flags &= ~TCP_CONN_FAST_RECOVERY
413 #define tcp_recovery_on(tc) (tc)->flags |= TCP_CONN_RECOVERY
414 #define tcp_recovery_off(tc) (tc)->flags &= ~TCP_CONN_RECOVERY
415 #define tcp_in_fastrecovery(tc) ((tc)->flags & TCP_CONN_FAST_RECOVERY)
416 #define tcp_in_recovery(tc) ((tc)->flags & (TCP_CONN_RECOVERY))
417 #define tcp_in_slowstart(tc) (tc->cwnd < tc->ssthresh)
418 #define tcp_disconnect_pending(tc) ((tc)->flags & TCP_CONN_DCNT_PENDING)
419 #define tcp_disconnect_pending_on(tc) ((tc)->flags |= TCP_CONN_DCNT_PENDING)
420 #define tcp_disconnect_pending_off(tc) ((tc)->flags &= ~TCP_CONN_DCNT_PENDING)
421 #define tcp_fastrecovery_first(tc) ((tc)->flags & TCP_CONN_FRXT_FIRST)
422 #define tcp_fastrecovery_first_on(tc) ((tc)->flags |= TCP_CONN_FRXT_FIRST)
423 #define tcp_fastrecovery_first_off(tc) ((tc)->flags &= ~TCP_CONN_FRXT_FIRST)
424 
425 #define tcp_in_cong_recovery(tc) ((tc)->flags & \
426  (TCP_CONN_FAST_RECOVERY | TCP_CONN_RECOVERY))
427 
428 always_inline void
430 {
431  tc->flags &= ~(TCP_CONN_FAST_RECOVERY | TCP_CONN_RECOVERY);
433 }
434 
435 #define tcp_csum_offload(tc) (!((tc)->cfg_flags & TCP_CFG_F_NO_CSUM_OFFLOAD))
436 
437 #define tcp_zero_rwnd_sent(tc) ((tc)->flags & TCP_CONN_ZERO_RWND_SENT)
438 #define tcp_zero_rwnd_sent_on(tc) (tc)->flags |= TCP_CONN_ZERO_RWND_SENT
439 #define tcp_zero_rwnd_sent_off(tc) (tc)->flags &= ~TCP_CONN_ZERO_RWND_SENT
440 
443 {
444  return (tcp_connection_t *) tconn;
445 }
446 
447 /*
448  * Define custom timer wheel geometry
449  */
450 
451 #undef TW_TIMER_WHEELS
452 #undef TW_SLOTS_PER_RING
453 #undef TW_RING_SHIFT
454 #undef TW_RING_MASK
455 #undef TW_TIMERS_PER_OBJECT
456 #undef LOG2_TW_TIMERS_PER_OBJECT
457 #undef TW_SUFFIX
458 #undef TW_OVERFLOW_VECTOR
459 #undef TW_FAST_WHEEL_BITMAP
460 #undef TW_TIMER_ALLOW_DUPLICATE_STOP
461 #undef TW_START_STOP_TRACE_SIZE
462 
463 #define TW_TIMER_WHEELS 2
464 #define TW_SLOTS_PER_RING 1024
465 #define TW_RING_SHIFT 10
466 #define TW_RING_MASK (TW_SLOTS_PER_RING -1)
467 #define TW_TIMERS_PER_OBJECT 16
468 #define LOG2_TW_TIMERS_PER_OBJECT 4
469 #define TW_SUFFIX _tcp_twsl
470 #define TW_FAST_WHEEL_BITMAP 0
471 #define TW_TIMER_ALLOW_DUPLICATE_STOP 1
472 
474 
475 typedef tw_timer_wheel_tcp_twsl_t tcp_timer_wheel_t;
476 
477 #endif /* SRC_VNET_TCP_TCP_TYPES_H_ */
478 
479 /*
480  * fd.io coding-style-patch-verification: ON
481  *
482  * Local Variables:
483  * eval: (c-set-style "gnu")
484  * End:
485  */
foreach_tcp_connection_flag
#define foreach_tcp_connection_flag
TCP connection flags.
Definition: tcp_types.h:118
tcp_bt_sample_::min_seq
u32 min_seq
Min seq number in sample.
Definition: tcp_types.h:210
tcp_connection_flag_bits_e
enum tcp_connection_flag_bits_ tcp_connection_flag_bits_e
trace
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
Definition: vlib_api_cli.c:870
tcp_byte_tracker_::sample_lookup
rb_tree_t sample_lookup
Rbtree for sample lookup by min_seq.
Definition: tcp_types.h:240
tcp_bt_sample_t
struct tcp_bt_sample_ tcp_bt_sample_t
tcp_bt_sample_::tx_time
f64 tx_time
Transmit time for the burst.
Definition: tcp_types.h:214
tcp_packet.h
foreach_tcp_fsm_state
#define foreach_tcp_fsm_state
TCP FSM state definitions as per RFC793.
Definition: tcp_types.h:43
tcp_rate_sample_t
struct tcp_rate_sample_ tcp_rate_sample_t
CLIB_CACHE_LINE_ALIGN_MARK
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
Definition: cache.h:60
name
string name[64]
Definition: fib.api:25
tcp_connection_flag_bits_
tcp_connection_flag_bits_
Definition: tcp_types.h:133
init
static void init(void)
Definition: client.c:83
clib.h
tcp_rate_sample_::prior_delivered
u64 prior_delivered
Delivered of sample used for rate, i.e., total bytes delivered at prior_time.
Definition: tcp_types.h:223
tcp_cfg_flag_bits_
tcp_cfg_flag_bits_
Definition: tcp_types.h:101
tcp_connection_flag_
tcp_connection_flag_
Definition: tcp_types.h:141
tcp_errors_::below_data_wnd
u32 below_data_wnd
All data in seg is below snd_una.
Definition: tcp_types.h:272
next
u16 * next
Definition: nat44_ei_out2in.c:718
tcp_errors_t
struct tcp_errors_ tcp_errors_t
tcp_connection_t
struct _tcp_connection tcp_connection_t
TCP_BTS_IS_RXT
@ TCP_BTS_IS_RXT
Definition: tcp_types.h:200
TCP_CONN_N_FLAGS
@ TCP_CONN_N_FLAGS
Definition: tcp_types.h:146
tcp_rate_sample_::flags
tcp_bts_flags_t flags
Rate sample flags from bt sample.
Definition: tcp_types.h:234
tcp_bts_flags_
tcp_bts_flags_
Definition: tcp_types.h:198
u16
unsigned short u16
Definition: types.h:57
tcp_cfg_flag_
tcp_cfg_flag_
Definition: tcp_types.h:109
tcp_bt_sample_::flags
tcp_bts_flags_t flags
Sample flag.
Definition: tcp_types.h:218
state
vl_api_dhcp_client_state_t state
Definition: dhcp.api:201
transport_connection_t
struct _transport_connection transport_connection_t
unformat_input_t
struct _unformat_input_t unformat_input_t
tcp_rate_sample_::lost
u32 lost
Number of bytes lost over interval.
Definition: tcp_types.h:233
TCP_BTS_IS_APP_LIMITED
@ TCP_BTS_IS_APP_LIMITED
Definition: tcp_types.h:201
tcp_connection_flags_e
enum tcp_connection_flag_ tcp_connection_flags_e
tcp_options_t
Definition: tcp_packet.h:143
tcp_cong_recovery_off
static void tcp_cong_recovery_off(tcp_connection_t *tc)
Definition: tcp_types.h:429
tcp_bt_sample_
Definition: tcp_types.h:206
tcp_rate_sample_::prior_time
f64 prior_time
Delivered time of sample used for rate.
Definition: tcp_types.h:225
tcp_byte_tracker_t
struct tcp_byte_tracker_ tcp_byte_tracker_t
tcp_timers_e
enum _tcp_timers tcp_timers_e
tcp_state_t
enum _tcp_state tcp_state_t
tcp_bt_sample_::next
u32 next
Next sample index in list.
Definition: tcp_types.h:208
tcp_byte_tracker_
Definition: tcp_types.h:237
tcp_byte_tracker_::tail
u32 tail
Tail of samples linked list.
Definition: tcp_types.h:242
TCP_BTS_IS_RXT_LOST
@ TCP_BTS_IS_RXT_LOST
Definition: tcp_types.h:203
tcp_byte_tracker_::last_ooo
u32 last_ooo
Cached last ooo sample.
Definition: tcp_types.h:243
TCP_CC_NEWRENO
@ TCP_CC_NEWRENO
Definition: tcp_types.h:248
pending_timers
static u32 * pending_timers
Vector of pending timers.
Definition: igmp_timer.c:65
tcp_bt_sample_::tx_lost
u64 tx_lost
Lost at tx time.
Definition: tcp_types.h:217
TCP_CC_ACK
@ TCP_CC_ACK
Definition: tcp_types.h:257
TCP_CFG_N_FLAG_BITS
@ TCP_CFG_N_FLAG_BITS
Definition: tcp_types.h:106
sack_scoreboard_t
struct _sack_scoreboard sack_scoreboard_t
TCP_CC_LAST
@ TCP_CC_LAST
Definition: tcp_types.h:250
foreach_tcp_cfg_flag
#define foreach_tcp_cfg_flag
Connection configuration flags.
Definition: tcp_types.h:94
end
f64 end
end of the time range
Definition: mactime.api:44
tw_timer_template.h
TW timer template header file, do not compile directly.
tcp_cc_algorithm_type_e
enum _tcp_cc_algorithm_type tcp_cc_algorithm_type_e
tcp_errors_::above_data_wnd
u32 above_data_wnd
Some data in segment is above snd_wnd.
Definition: tcp_types.h:273
tcp_rate_sample_::interval_time
f64 interval_time
Time to ack the bytes delivered.
Definition: tcp_types.h:226
uword
u64 uword
Definition: types.h:112
tcp_bt_sample_::tx_in_flight
u64 tx_in_flight
In flight at tx time.
Definition: tcp_types.h:216
tcp_bt_sample_::max_seq
u32 max_seq
Max seq number.
Definition: tcp_types.h:211
tcp_bt_sample_::prev
u32 prev
Previous sample index in list.
Definition: tcp_types.h:209
f64
double f64
Definition: types.h:142
tcp_rate_sample_::delivered
u32 delivered
Bytes delivered in interval_time.
Definition: tcp_types.h:230
sack_block_t
struct _sack_block sack_block_t
tcp_bts_flags_t
enum tcp_bts_flags_ tcp_bts_flags_t
TCP_BTS_IS_SACKED
@ TCP_BTS_IS_SACKED
Definition: tcp_types.h:202
rbtree.h
TCP_N_TIMERS
@ TCP_N_TIMERS
Definition: tcp_types.h:76
TCP_CC_DUPACK
@ TCP_CC_DUPACK
Definition: tcp_types.h:258
TCP_CC_DATA_SZ
#define TCP_CC_DATA_SZ
Definition: tcp_types.h:34
always_inline
#define always_inline
Definition: rdma_mlx5dv.h:23
sack_scoreboard_hole_t
struct _sack_scoreboard_hole sack_scoreboard_hole_t
tcp_rate_sample_
Definition: tcp_types.h:221
u64
unsigned long u64
Definition: types.h:89
u32
unsigned int u32
Definition: types.h:88
tcp_cfg_flag_bits_e
enum tcp_cfg_flag_bits_ tcp_cfg_flag_bits_e
rb_tree_
Definition: rbtree.h:42
tcp_bt_sample_::first_tx_time
f64 first_tx_time
Connection first tx time at tx.
Definition: tcp_types.h:215
tcp_rate_sample_::rtt_time
f64 rtt_time
RTT for sample.
Definition: tcp_types.h:227
tcp_bt_sample_::delivered_time
f64 delivered_time
Delivered time when sample taken.
Definition: tcp_types.h:213
tcp_rate_sample_::last_lost
u32 last_lost
Bytes lost now.
Definition: tcp_types.h:232
tcp_errors_
Definition: tcp_types.h:270
tcp_errors_::above_ack_wnd
u32 above_ack_wnd
Acks for data not sent.
Definition: tcp_types.h:275
TCP_CONN_N_FLAG_BITS
@ TCP_CONN_N_FLAG_BITS
Definition: tcp_types.h:138
tcp_rate_sample_::tx_lost
u64 tx_lost
Lost over interval.
Definition: tcp_types.h:229
tcp_get_connection_from_transport
static tcp_connection_t * tcp_get_connection_from_transport(transport_connection_t *tconn)
Definition: tcp_types.h:442
tcp_cc_algorithm_t
struct _tcp_cc_algorithm tcp_cc_algorithm_t
Definition: tcp_types.h:253
u8
unsigned char u8
Definition: types.h:56
transport.h
TCP_CFG_N_FLAGS
@ TCP_CFG_N_FLAGS
Definition: tcp_types.h:114
TCP_CC_CUBIC
@ TCP_CC_CUBIC
Definition: tcp_types.h:249
TCP_CC_PARTIALACK
@ TCP_CC_PARTIALACK
Definition: tcp_types.h:259
tcp_cfg_flags_e
enum tcp_cfg_flag_ tcp_cfg_flags_e
tcp_fastrecovery_first_off
#define tcp_fastrecovery_first_off(tc)
Definition: tcp_types.h:423
tcp_byte_tracker_::head
u32 head
Head of samples linked list.
Definition: tcp_types.h:241
TCP_N_STATES
@ TCP_N_STATES
Definition: tcp_types.h:61
tcp_rate_sample_::acked_and_sacked
u32 acked_and_sacked
Bytes acked + sacked now.
Definition: tcp_types.h:231
cleanup
static void cleanup(void)
Definition: client.c:98
tcp_cc_ack_t
enum _tcp_cc_ack_t tcp_cc_ack_t
tcp_timer_wheel_t
tw_timer_wheel_tcp_twsl_t tcp_timer_wheel_t
Definition: tcp_types.h:475
scoreboard_trace_elt_t
struct _scoreboard_trace_elt scoreboard_trace_elt_t
tcp_cc_event_
tcp_cc_event_
Definition: tcp_types.h:262
tcp_rate_sample_::tx_in_flight
u64 tx_in_flight
In flight at (re)transmit time.
Definition: tcp_types.h:228
tcp_errors_::below_ack_wnd
u32 below_ack_wnd
Acks for data below snd_una.
Definition: tcp_types.h:274
tcp_cc_event_t
enum tcp_cc_event_ tcp_cc_event_t
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
TCP_CC_EVT_START_TX
@ TCP_CC_EVT_START_TX
Definition: tcp_types.h:264
foreach_tcp_timer
#define foreach_tcp_timer
TCP timers.
Definition: tcp_types.h:65
tcp_bt_sample_::delivered
u64 delivered
Total delivered bytes for sample.
Definition: tcp_types.h:212
tcp_byte_tracker_::samples
tcp_bt_sample_t * samples
Pool of samples.
Definition: tcp_types.h:239
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105