FreeBSD kernel IPv4 code
tcp_rack.h
Go to the documentation of this file.
1/*-
2 * Copyright (c) 2016-2020 Netflix, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
25 * $FreeBSD$
26 */
27
28#ifndef _NETINET_TCP_RACK_H_
29#define _NETINET_TCP_RACK_H_
30
31#define RACK_ACKED 0x000001/* The remote endpoint acked this */
32#define RACK_TO_REXT 0x000002/* A timeout occured on this sendmap entry */
33#define RACK_DEFERRED 0x000004/* We can't use this for RTT calc - not used */
34#define RACK_OVERMAX 0x000008/* We have more retran's then we can fit */
35#define RACK_SACK_PASSED 0x000010/* A sack was done above this block */
36#define RACK_WAS_SACKPASS 0x000020/* We retransmitted due to SACK pass */
37#define RACK_HAS_FIN 0x000040/* segment is sent with fin */
38#define RACK_TLP 0x000080/* segment sent as tail-loss-probe */
39#define RACK_RWND_COLLAPSED 0x000100/* The peer collapsed the rwnd on the segment */
40#define RACK_APP_LIMITED 0x000200/* We went app limited after this send */
41#define RACK_WAS_ACKED 0x000400/* a RTO undid the ack, but it already had a rtt calc done */
42#define RACK_HAS_SYN 0x000800/* SYN is on this guy */
43#define RACK_SENT_W_DSACK 0x001000/* Sent with a dsack */
44#define RACK_SENT_SP 0x002000/* sent in slow path */
45#define RACK_SENT_FP 0x004000/* sent in fast path */
46#define RACK_HAD_PUSH 0x008000/* Push was sent on original send */
47#define RACK_MUST_RXT 0x010000/* We must retransmit this rsm (non-sack/mtu chg)*/
48#define RACK_NUM_OF_RETRANS 3
50#define RACK_INITIAL_RTO 1000000 /* 1 second in microseconds */
52#define RACK_REQ_AVG 3 /* Must be less than 256 */
55 TAILQ_ENTRY(rack_sendmap) r_tnext; /* Time of transmit based next */
56 uint32_t r_start; /* Sequence number of the segment */
57 uint32_t r_end; /* End seq, this is 1 beyond actually */
58 uint32_t r_rtr_bytes; /* How many bytes have been retransmitted */
59 uint32_t r_flags : 24, /* Flags as defined above */
60 r_rtr_cnt : 8; /* Retran count, index this -1 to get time */
61 struct mbuf *m;
64 uint32_t r_nseq_appl; /* If this one is app limited, this is the nxt seq limited */
65 uint8_t r_dupack; /* Dup ack count */
66 uint8_t r_in_tmap; /* Flag to see if its in the r_tnext array */
67 uint8_t r_limit_type; /* is this entry counted against a limit? */
68 uint8_t r_just_ret : 1, /* After sending, the next pkt was just returned, i.e. limited */
69 r_one_out_nr : 1, /* Special case 1 outstanding and not in recovery */
70 r_no_rtt_allowed : 1, /* No rtt measurement allowed */
74 uint64_t r_ack_arrival; /* This is the time of ack-arrival (if SACK'd) */
75 RB_ENTRY(rack_sendmap) r_next; /* RB Tree next */
76 uint32_t r_fas; /* Flight at send */
77};
82 uint64_t optval;
83};
85/*
86 * Timestamps in the rack sendmap are now moving to be
87 * uint64_t's. This means that if you want a uint32_t
88 * usec timestamp (the old usecond timestamp) you simply have
89 * to cast it to uint32_t. The reason we do this is not for
90 * wrap, but we need to get back, at times, to the millisecond
91 * timestamp that is used in the TSTMP option. To do this we
92 * can use the rack_ts_to_msec() inline below which can take
93 * the 64bit ts and make into the correct timestamp millisecond
94 * wise. Thats not possible with the 32bit usecond timestamp since
95 * the seconds wrap too quickly to cover all bases.
96 *
97 * There are quite a few places in rack where I simply cast
98 * back to uint32_t and then end up using the TSTMP_XX()
99 * macros. This is ok, but we could do simple compares if
100 * we ever decided to move all of those variables to 64 bits
101 * as well.
102 */
104inline uint64_t
105rack_to_usec_ts(struct timeval *tv)
107 return ((tv->tv_sec * HPTS_USEC_IN_SEC) + tv->tv_usec);
111rack_ts_to_msec(uint64_t ts)
113 return((uint32_t)(ts / HPTS_MSEC_IN_SEC));
117RB_HEAD(rack_rb_tree_head, rack_sendmap);
120
121/* Map change logging */
122#define MAP_MERGE 0x01
123#define MAP_SPLIT 0x02
124#define MAP_NEW 0x03
125#define MAP_SACK_M1 0x04
126#define MAP_SACK_M2 0x05
127#define MAP_SACK_M3 0x06
128#define MAP_SACK_M4 0x07
129#define MAP_SACK_M5 0x08
130#define MAP_FREE 0x09
131#define MAP_TRIM_HEAD 0x0a
132
133#define RACK_LIMIT_TYPE_SPLIT 1
134
135/*
136 * We use the rate sample structure to
137 * assist in single sack/ack rate and rtt
138 * calculation. In the future we will expand
139 * this in BBR to do forward rate sample
140 * b/w estimation.
141 */
142#define RACK_RTT_EMPTY 0x00000001 /* Nothing yet stored in RTT's */
143#define RACK_RTT_VALID 0x00000002 /* We have at least one valid RTT */
150 int32_t confidence;
151 uint64_t rs_rtt_tot;
153};
154
155#define RACK_LOG_TYPE_ACK 0x01
156#define RACK_LOG_TYPE_OUT 0x02
157#define RACK_LOG_TYPE_TO 0x03
158#define RACK_LOG_TYPE_ALLOC 0x04
159#define RACK_LOG_TYPE_FREE 0x05
160
161/*
162 * Magic numbers for logging timeout events if the
163 * logging is enabled.
164 */
165#define RACK_TO_FRM_TMR 1
166#define RACK_TO_FRM_TLP 2
167#define RACK_TO_FRM_RACK 3
168#define RACK_TO_FRM_KEEP 4
169#define RACK_TO_FRM_PERSIST 5
170#define RACK_TO_FRM_DELACK 6
171
185 uint64_t tcp_tlp_use;
191 uint64_t tcp_rack_rr;
203 /* Temp counters for dsack */
209 /* non temp counters */
215 uint64_t tcp_fillcw;
216 uint64_t tcp_npush;
217 uint64_t tcp_lscwnd;
218 uint64_t tcp_profile;
235};
236
237/* RTT shrink reasons */
238#define RACK_RTTS_INIT 0
239#define RACK_RTTS_NEWRTT 1
240#define RACK_RTTS_EXITPROBE 2
241#define RACK_RTTS_ENTERPROBE 3
242#define RACK_RTTS_REACHTARGET 4
243#define RACK_RTTS_SEEHBP 5
244#define RACK_RTTS_NOBACKOFF 6
245#define RACK_RTTS_SAFETY 7
246
247#define RACK_USE_BEG 1
248#define RACK_USE_END 2
249#define RACK_USE_END_OR_THACK 3
250
251#define TLP_USE_ID 1 /* Internet draft behavior */
252#define TLP_USE_TWO_ONE 2 /* Use 2.1 behavior */
253#define TLP_USE_TWO_TWO 3 /* Use 2.2 behavior */
254#define RACK_MIN_BW 8000 /* 64kbps in Bps */
255
256/* Rack quality indicators for GPUT measurements */
257#define RACK_QUALITY_NONE 0 /* No quality stated */
258#define RACK_QUALITY_HIGH 1 /* A normal measurement of a GP RTT */
259#define RACK_QUALITY_APPLIMITED 2 /* An app limited case that may be of lower quality */
260#define RACK_QUALITY_PERSIST 3 /* A measurement where we went into persists */
261#define RACK_QUALITY_PROBERTT 4 /* A measurement where we went into or exited probe RTT */
262#define RACK_QUALITY_ALLACKED 5 /* All data is now acknowledged */
263
264
265#define MIN_GP_WIN 6 /* We need at least 6 MSS in a GP measurement */
266#ifdef _KERNEL
267#define RACK_OPTS_SIZE (sizeof(struct rack_opts_stats)/sizeof(uint64_t))
268extern counter_u64_t rack_opts_arry[RACK_OPTS_SIZE];
269#define RACK_OPTS_ADD(name, amm) counter_u64_add(rack_opts_arry[(offsetof(struct rack_opts_stats, name)/sizeof(uint64_t))], (amm))
270#define RACK_OPTS_INC(name) RACK_OPTS_ADD(name, 1)
271#endif
272/*
273 * As we get each SACK we wade through the
274 * rc_map and mark off what is acked.
275 * We also increment rc_sacked as well.
276 *
277 * We also pay attention to missing entries
278 * based on the time and possibly mark them
279 * for retransmit. If we do and we are not already
280 * in recovery we enter recovery. In doing
281 * so we claer prr_delivered/holes_rxt and prr_sent_dur_rec.
282 * We also setup rc_next/rc_snd_nxt/rc_send_end so
283 * we will know where to send from. When not in
284 * recovery rc_next will be NULL and rc_snd_nxt should
285 * equal snd_max.
286 *
287 * Whenever we retransmit from recovery we increment
288 * rc_holes_rxt as we retran a block and mark it as retransmitted
289 * with the time it was sent. During non-recovery sending we
290 * add to our map and note the time down of any send expanding
291 * the rc_map at the tail and moving rc_snd_nxt up with snd_max.
292 *
293 * In recovery during SACK/ACK processing if a chunk has
294 * been retransmitted and it is now acked, we decrement rc_holes_rxt.
295 * When we retransmit from the scoreboard we use
296 * rc_next and rc_snd_nxt/rc_send_end to help us
297 * find what needs to be retran.
298 *
299 * To calculate pipe we simply take (snd_max - snd_una) + rc_holes_rxt
300 * This gets us the effect of RFC6675 pipe, counting twice for
301 * bytes retransmitted.
302 */
303
304#define TT_RACK_FR_TMR 0x2000
305
306/*
307 * Locking for the rack control block.
308 * a) Locked by INP_WLOCK
309 * b) Locked by the hpts-mutex
310 *
311 */
312#define RACK_GP_HIST 4 /* How much goodput history do we maintain? */
313
314#define RACK_NUM_FSB_DEBUG 16
315#ifdef _KERNEL
324 struct tcphdr *th;
325 struct udphdr *udp;
326 struct mbuf *m;
330 unused : 30;
331};
332
334 /* Second cache line 0x40 from tcp_rack */
335 struct rack_rb_tree_head rc_mtree; /* Tree of all segments Lock(a) */
336 struct rack_head rc_tmap; /* List in transmit order Lock(a) */
337 struct rack_sendmap *rc_tlpsend; /* Remembered place for
338 * tlp_sending Lock(a) */
339 struct rack_sendmap *rc_resend; /* something we have been asked to
340 * resend */
341 struct rack_fast_send_blk fsb; /* The fast-send block */
349 uint32_t cwnd_to_use; /* The cwnd in use */
350 uint32_t rc_timer_exp; /* If a timer ticks of expiry */
351 uint32_t rc_rack_min_rtt; /* lowest RTT seen Lock(a) */
352 uint32_t rc_rack_largest_cwnd; /* Largest CWND we have seen Lock(a) */
353
354 /* Third Cache line 0x80 */
355 struct rack_head rc_free; /* Allocation array */
358 uint64_t bw_rate_cap;
359 uint32_t rc_reorder_ts; /* Last time we saw reordering Lock(a) */
360
361 uint32_t rc_tlp_new_data; /* we need to send new-data on a TLP
362 * Lock(a) */
363 uint32_t rc_prr_out; /* bytes sent during recovery Lock(a) */
364
365 uint32_t rc_prr_recovery_fs; /* recovery fs point Lock(a) */
366
367 uint32_t rc_prr_sndcnt; /* Prr sndcnt Lock(a) */
368
369 uint32_t rc_sacked; /* Tot sacked on scoreboard Lock(a) */
370 uint32_t last_sent_tlp_seq; /* Last tlp sequence that was retransmitted Lock(a) */
371
372 uint32_t rc_prr_delivered; /* during recovery prr var Lock(a) */
373 uint16_t rc_tlp_cnt_out; /* count of times we have sent a TLP without new data */
374 uint16_t last_sent_tlp_len; /* Number of bytes in the last sent tlp */
375
376 uint32_t rc_loss_count; /* How many bytes have been retransmitted
377 * Lock(a) */
378 uint32_t rc_reorder_fade; /* Socket option value Lock(a) */
379
380 /* Forth cache line 0xc0 */
381 /* Times */
382
383 uint32_t rc_rack_tmit_time; /* Rack transmit time Lock(a) */
384 uint32_t rc_holes_rxt; /* Tot retraned from scoreboard Lock(a) */
385
386 uint32_t rc_num_maps_alloced; /* Number of map blocks (sacks) we
387 * have allocated */
388 uint32_t rc_rcvtime; /* When we last received data */
389 uint32_t rc_num_split_allocs; /* num split map entries allocated */
390
393
394 struct rack_sendmap *rc_sacklast; /* sack remembered place
395 * Lock(a) */
396
397 struct rack_sendmap *rc_first_appl; /* Pointer to first app limited */
398 struct rack_sendmap *rc_end_appl; /* Pointer to last app limited */
399 /* Cache line split 0x100 */
401 /* Cache line split 0x140 */
402 /* Flags for various things */
406 uint16_t rack_per_of_gp_ss; /* 100 = 100%, so from 65536 = 655 x bw */
407 uint16_t rack_per_of_gp_ca; /* 100 = 100%, so from 65536 = 655 x bw */
408 uint16_t rack_per_of_gp_rec; /* 100 = 100%, so from 65536 = 655 x bw, 0=off */
409 uint16_t rack_per_of_gp_probertt; /* 100 = 100%, so from 65536 = 655 x bw, 0=off */
421 uint64_t rc_gp_output_ts; /* chg*/
422 uint64_t rc_gp_cumack_ts; /* chg*/
423 struct timeval act_rcv_time;
424 struct timeval rc_last_time_decay; /* SAD time decay happened here */
425 uint64_t gp_bw;
426 uint64_t init_rate;
427#ifdef NETFLIX_SHARED_CWND
428 struct shared_cwnd *rc_scw;
429#endif
431 uint64_t last_max_bw; /* Our calculated max b/w last */
432 struct time_filter_small rc_gp_min_rtt;
433 struct def_opt_head opt_list;
434 int32_t rc_rtt_diff; /* Timely style rtt diff of our gp_srtt */
435 uint32_t rc_gp_srtt; /* Current GP srtt */
436 uint32_t rc_prev_gp_srtt; /* Previous RTT */
437 uint32_t rc_entry_gp_rtt; /* Entry to PRTT gp-rtt */
438 uint32_t rc_loss_at_start; /* At measurement window where was our lost value */
439
440 uint32_t dsack_round_end; /* In a round of seeing a DSACK */
441 uint32_t current_round; /* Starting at zero */
442 uint32_t roundends; /* acked value above which round ends */
443 uint32_t num_dsack; /* Count of dsack's seen (1 per window)*/
445 uint32_t rc_lower_rtt_us_cts; /* Time our GP rtt was last lowered */
453 uint32_t rc_probertt_sndmax_atexit; /* Highest sent to in probe-rtt */
458 uint32_t rc_gp_lowrtt; /* Lowest rtt seen during GPUT measurement */
459 uint32_t rc_gp_high_rwnd; /* Highest rwnd seen during GPUT measurement */
460 uint32_t rc_snd_max_at_rto; /* For non-sack when the RTO occured what was snd-max */
463 uint32_t rc_tlp_threshold; /* Socket option value Lock(a) */
469 uint32_t rc_min_to; /* Socket option value Lock(a) */
470 uint32_t rc_pkt_delay; /* Socket option value Lock(a) */
473 * For newreno cc:
474 * rc_saved_cc are the values we have had
475 * set by the user, if pacing is not happening
476 * (i.e. its early and we have not turned on yet
477 * or it was turned off). The minute pacing
478 * is turned on we pull out the values currently
479 * being used by newreno and replace them with
480 * these values, then save off the old values here,
481 * we also set the flag (if ecn_beta is set) to make
482 * new_reno do less of a backoff for ecn (think abe).
483 */
484 uint16_t rc_early_recovery_segs; /* Socket option value Lock(a) */
485 uint16_t rc_reorder_shift; /* Socket option value Lock(a) */
487 uint8_t rc_no_push_at_mrtt; /* No push when we exceed max rtt */
488 uint8_t num_measurements; /* Number of measurements (up to 0xff, we freeze at 0xff) */
489 uint8_t req_measurements; /* How many measurements are required? */
490 uint8_t rc_tlp_cwnd_reduce; /* Socket option value Lock(a) */
491 uint8_t rc_prr_sendalot;/* Socket option value Lock(a) */
493};
494#endif
495
496#define RACK_TIMELY_CNT_BOOST 5 /* At 5th increase boost */
497#define RACK_MINRTT_FILTER_TIM 10 /* Seconds */
498
499#define RACK_HYSTART_OFF 0
500#define RACK_HYSTART_ON 1 /* hystart++ on */
501#define RACK_HYSTART_ON_W_SC 2 /* hystart++ on +Slam Cwnd */
502#define RACK_HYSTART_ON_W_SC_C 3 /* hystart++ on,
503 * Conservative ssthresh and
504 * +Slam cwnd
505 */
507#ifdef _KERNEL
509struct tcp_rack {
510 /* First cache line 0x00 */
511 TAILQ_ENTRY(tcp_rack) r_hpts; /* hptsi queue next Lock(b) */
512 int32_t(*r_substate) (struct mbuf *, struct tcphdr *,
513 struct socket *, struct tcpcb *, struct tcpopt *,
514 int32_t, int32_t, uint32_t, int, int, uint8_t); /* Lock(a) */
515 struct tcpcb *rc_tp; /* The tcpcb Lock(a) */
516 struct inpcb *rc_inp; /* The inpcb Lock(a) */
517 uint8_t rc_free_cnt; /* Number of free entries on the rc_free list
518 * Lock(a) */
519 uint8_t client_bufferlvl; /* 0 - 5 normaly, less than or at 2 means its real low */
522 defer_options: 1,
523 fast_rsm_hack: 1,
525 * If set it will override pacing restrictions on not sending
526 * data when the pacing timer is running. I.e. you set this
527 * and an ACK will send data. Default is off and its only used
528 * without pacing when we are doing 5G speed up for there
529 * ack filtering.
530 */
531 rc_pacing_cc_set: 1, /*
532 * If we are pacing (pace_always=1) and we have reached the
533 * point where we start pacing (fixed or gp has reached its
534 * magic gp_ready state) this flag indicates we have set in
535 * values to effect CC's backoff's. If pacing is turned off
536 * then we must restore the values saved in rc_saved_beta,
537 * if its going to gp_ready we need to copy the values into
538 * the CC module and set our flags.
539 *
540 * Note this only happens if the cc name is newreno (CCALGONAME_NEWRENO).
541 */
552 uint32_t rc_rack_rtt; /* RACK-RTT Lock(a) */
553 uint16_t r_mbuf_queue : 1, /* Do we do mbuf queue for non-paced */
554 rtt_limit_mul : 4, /* muliply this by low rtt */
556 r_must_retran : 1, /* For non-sack customers we hit an RTO and new data should be resends */
557 r_use_cmp_ack: 1, /* Do we use compressed acks */
558 r_ent_rec_ns: 1, /* We entered recovery and have not sent */
559 r_might_revert: 1, /* Flag to find out if we might need to revert */
560 r_fast_output: 1, /* Fast output is in progress we can skip the bulk of rack_output */
563 r_up_only: 1,
567 uint8_t rc_user_set_max_segs; /* Socket option value Lock(a) */
568 uint8_t rc_labc; /* Appropriate Byte Counting Value */
575 rc_highly_buffered: 1, /* The path is highly buffered */
577 rc_dack_mode : 1, /* Mac O/S emulation of d-ack */
578 rc_dack_toggle : 1, /* For Mac O/S emulation of d-ack */
581 uint8_t r_state; /* Current rack state Lock(a) */
584 uint8_t rc_enobuf : 7, /* count of enobufs on connection provides */
586 uint8_t r_timer_override : 1, /* hpts override Lock(a) */
587 r_is_v6 : 1, /* V6 pcb Lock(a) */
590 rc_always_pace : 1, /* Socket option value Lock(a) */
599 rack_hdrw_pacing : 1, /* We are doing Hardware pacing */
600 rack_hdw_pace_ena : 1, /* Is hardware pacing enabled? */
601 rack_attempt_hdwr_pace : 1; /* Did we attempt hdwr pacing (if allowed) */
602 uint8_t rack_tlp_threshold_use : 3, /* only 1, 2 and 3 used so far */
630 /* Cache line 2 0x40 */
631 struct rack_control r_ctl;
632} __aligned(CACHE_LINE_SIZE);
633
634#endif
635#endif
__uint32_t uint32_t
Definition: in.h:62
__uint16_t uint16_t
Definition: in.h:57
__uint8_t uint8_t
Definition: in.h:52
ipfw_dyn_rule * next
Definition: ip_fw.h:0
uint64_t optval
Definition: tcp_rack.h:82
TAILQ_ENTRY(deferred_opt_list) next
Definition: in_pcb.h:217
uint32_t ack_count
Definition: tcp_rack.h:411
uint32_t rc_ssthresh_at_erec
Definition: tcp_rack.h:455
uint32_t rc_prr_sndcnt
Definition: tcp_rack.h:367
uint8_t dsack_persist
Definition: tcp_rack.h:486
uint32_t rc_cwnd_at_erec
Definition: tcp_rack.h:454
uint32_t retran_during_recovery
Definition: tcp_rack.h:457
uint32_t rc_fixed_pacing_rate_rec
Definition: tcp_rack.h:347
struct time_filter_small rc_gp_min_rtt
Definition: tcp_rack.h:432
uint32_t rc_timer_exp
Definition: tcp_rack.h:350
uint32_t rc_went_idle_time
Definition: tcp_rack.h:392
struct rack_sendmap * rc_resend
Definition: tcp_rack.h:339
uint32_t rc_last_us_rtt
Definition: tcp_rack.h:450
uint32_t rc_prr_delivered
Definition: tcp_rack.h:372
uint64_t last_gp_comp_bw
Definition: tcp_rack.h:430
uint32_t rc_highest_us_rtt
Definition: tcp_rack.h:449
struct rack_sendmap * rc_end_appl
Definition: tcp_rack.h:398
struct rack_sendmap * rc_first_appl
Definition: tcp_rack.h:397
uint32_t rc_probertt_sndmax_atexit
Definition: tcp_rack.h:453
uint32_t rc_min_to
Definition: tcp_rack.h:469
uint32_t rc_pace_max_segs
Definition: tcp_rack.h:403
struct rack_sendmap * rc_sacklast
Definition: tcp_rack.h:394
uint16_t rack_per_of_gp_ss
Definition: tcp_rack.h:406
uint32_t rc_pkt_delay
Definition: tcp_rack.h:470
uint16_t rc_early_recovery_segs
Definition: tcp_rack.h:484
uint8_t rc_rate_sample_method
Definition: tcp_rack.h:492
uint32_t rc_num_split_allocs
Definition: tcp_rack.h:389
uint32_t rc_reorder_fade
Definition: tcp_rack.h:378
uint32_t rc_rcvtime
Definition: tcp_rack.h:388
uint32_t challenge_ack_ts
Definition: tcp_rack.h:467
int32_t rc_scw_index
Definition: tcp_rack.h:462
uint32_t rc_lower_rtt_us_cts
Definition: tcp_rack.h:445
uint32_t dsack_byte_cnt
Definition: tcp_rack.h:456
struct rack_sendmap * rc_tlpsend
Definition: tcp_rack.h:337
uint16_t rack_per_of_gp_ca
Definition: tcp_rack.h:407
uint16_t rc_reorder_shift
Definition: tcp_rack.h:485
uint32_t rc_last_timeout_snduna
Definition: tcp_rack.h:464
uint32_t rc_agg_early
Definition: tcp_rack.h:417
uint16_t rack_per_of_gp_probertt
Definition: tcp_rack.h:409
uint16_t rack_per_of_gp_rec
Definition: tcp_rack.h:408
uint64_t rc_gp_output_ts
Definition: tcp_rack.h:421
uint32_t rc_num_maps_alloced
Definition: tcp_rack.h:386
uint32_t rc_loss_count
Definition: tcp_rack.h:376
uint32_t rc_rack_tmit_time
Definition: tcp_rack.h:383
struct rack_rb_tree_head rc_mtree
Definition: tcp_rack.h:335
uint32_t sack_count
Definition: tcp_rack.h:412
uint64_t bw_rate_cap
Definition: tcp_rack.h:358
uint64_t gp_bw
Definition: tcp_rack.h:425
struct rack_head rc_tmap
Definition: tcp_rack.h:336
uint32_t rc_lowest_us_rtt
Definition: tcp_rack.h:448
uint32_t rc_rack_min_rtt
Definition: tcp_rack.h:351
uint32_t rc_last_output_to
Definition: tcp_rack.h:391
uint32_t rc_snd_max_at_rto
Definition: tcp_rack.h:460
uint32_t rc_agg_delayed
Definition: tcp_rack.h:418
uint32_t rc_target_probertt_flight
Definition: tcp_rack.h:452
uint32_t rc_saved_cwnd
Definition: tcp_rack.h:420
uint64_t crte_prev_rate
Definition: tcp_rack.h:357
uint32_t last_sent_tlp_seq
Definition: tcp_rack.h:370
uint32_t rc_high_rwnd
Definition: tcp_rack.h:410
struct timeval rc_last_time_decay
Definition: tcp_rack.h:424
uint32_t rc_prr_out
Definition: tcp_rack.h:363
uint32_t rc_reorder_ts
Definition: tcp_rack.h:359
uint32_t cwnd_to_use
Definition: tcp_rack.h:349
uint32_t rc_fixed_pacing_rate_ss
Definition: tcp_rack.h:348
uint32_t last_tlp_acked_start
Definition: tcp_rack.h:465
struct newreno rc_saved_beta
Definition: tcp_rack.h:472
uint32_t rc_tlp_threshold
Definition: tcp_rack.h:463
uint32_t sack_moved_extra
Definition: tcp_rack.h:414
uint32_t rc_loss_at_start
Definition: tcp_rack.h:438
uint32_t rc_hpts_flags
Definition: tcp_rack.h:345
uint32_t last_tlp_acked_end
Definition: tcp_rack.h:466
uint32_t input_pkt
Definition: tcp_rack.h:343
struct timeval act_rcv_time
Definition: tcp_rack.h:423
struct rack_head rc_free
Definition: tcp_rack.h:355
uint8_t rc_tlp_cwnd_reduce
Definition: tcp_rack.h:490
uint32_t dsack_round_end
Definition: tcp_rack.h:440
uint8_t rc_no_push_at_mrtt
Definition: tcp_rack.h:487
uint32_t rc_pace_min_segs
Definition: tcp_rack.h:404
uint32_t sack_noextra_move
Definition: tcp_rack.h:413
uint16_t last_sent_tlp_len
Definition: tcp_rack.h:374
int32_t rc_rtt_diff
Definition: tcp_rack.h:434
uint16_t rc_tlp_cnt_out
Definition: tcp_rack.h:373
uint32_t rc_fixed_pacing_rate_ca
Definition: tcp_rack.h:346
uint32_t forced_ack_ts
Definition: tcp_rack.h:444
uint32_t rc_gp_lowrtt
Definition: tcp_rack.h:458
uint32_t rc_prr_recovery_fs
Definition: tcp_rack.h:365
uint32_t challenge_ack_cnt
Definition: tcp_rack.h:468
uint8_t req_measurements
Definition: tcp_rack.h:489
uint8_t num_measurements
Definition: tcp_rack.h:488
uint32_t rc_holes_rxt
Definition: tcp_rack.h:384
struct rack_fast_send_blk fsb
Definition: tcp_rack.h:341
uint32_t rc_app_limited_cnt
Definition: tcp_rack.h:405
uint32_t saved_input_pkt
Definition: tcp_rack.h:344
uint32_t rc_time_probertt_entered
Definition: tcp_rack.h:446
const struct tcp_hwrate_limit_table * crte
Definition: tcp_rack.h:416
uint8_t rc_prr_sendalot
Definition: tcp_rack.h:491
uint32_t rc_gp_high_rwnd
Definition: tcp_rack.h:459
uint32_t rc_prev_gp_srtt
Definition: tcp_rack.h:436
uint64_t init_rate
Definition: tcp_rack.h:426
uint32_t rc_out_at_rto
Definition: tcp_rack.h:461
uint32_t rc_rack_largest_cwnd
Definition: tcp_rack.h:352
uint32_t rc_gp_srtt
Definition: tcp_rack.h:435
uint32_t roundends
Definition: tcp_rack.h:442
uint32_t rc_tlp_new_data
Definition: tcp_rack.h:361
struct def_opt_head opt_list
Definition: tcp_rack.h:433
uint32_t rc_sacked
Definition: tcp_rack.h:369
uint32_t rc_tlp_rxt_last_time
Definition: tcp_rack.h:419
uint32_t rc_time_probertt_starts
Definition: tcp_rack.h:447
uint32_t rc_entry_gp_rtt
Definition: tcp_rack.h:437
uint32_t num_dsack
Definition: tcp_rack.h:443
uint32_t rc_time_of_last_probertt
Definition: tcp_rack.h:451
uint32_t persist_lost_ends
Definition: tcp_rack.h:471
struct sack_filter rack_sf
Definition: tcp_rack.h:400
struct rack_rtt_sample rack_rs
Definition: tcp_rack.h:415
uint64_t last_max_bw
Definition: tcp_rack.h:431
uint32_t current_round
Definition: tcp_rack.h:441
uint32_t timer_slop
Definition: tcp_rack.h:342
uint64_t last_hw_bw_req
Definition: tcp_rack.h:356
uint64_t rc_gp_cumack_ts
Definition: tcp_rack.h:422
uint32_t o_m_len
Definition: tcp_rack.h:327
uint32_t recwin
Definition: tcp_rack.h:322
uint32_t rfo_apply_push
Definition: tcp_rack.h:328
struct udphdr * udp
Definition: tcp_rack.h:325
uint8_t * tcp_ip_hdr
Definition: tcp_rack.h:321
struct tcphdr * th
Definition: tcp_rack.h:324
uint32_t left_to_send
Definition: tcp_rack.h:317
uint8_t hoplimit
Definition: tcp_rack.h:320
struct mbuf * m
Definition: tcp_rack.h:326
uint32_t unused
Definition: tcp_rack.h:330
uint8_t tcp_flags
Definition: tcp_rack.h:319
uint32_t hw_tls
Definition: tcp_rack.h:329
uint16_t tcp_ip_hdr_len
Definition: tcp_rack.h:318
uint64_t tcp_rack_mbufq
Definition: tcp_rack.h:214
uint64_t tcp_rack_scwnd
Definition: tcp_rack.h:210
uint64_t tcp_rack_rtt_use
Definition: tcp_rack.h:227
uint64_t tcp_rack_rr
Definition: tcp_rack.h:191
uint64_t tcp_rack_force_max_seg
Definition: tcp_rack.h:200
uint64_t tcp_lscwnd
Definition: tcp_rack.h:217
uint64_t tcp_npush
Definition: tcp_rack.h:216
uint64_t tcp_rec_abc_val
Definition: tcp_rack.h:224
uint64_t tcp_rack_max_seg
Definition: tcp_rack.h:176
uint64_t tcp_rack_beta
Definition: tcp_rack.h:231
uint64_t tcp_rack_min_to
Definition: tcp_rack.h:178
uint64_t tcp_sack_path_1
Definition: tcp_rack.h:204
uint64_t tcp_initial_win
Definition: tcp_rack.h:195
uint64_t tcp_rack_do_detection
Definition: tcp_rack.h:192
uint64_t tcp_pacing_rate_cap
Definition: tcp_rack.h:220
uint64_t tcp_rack_timer_slop
Definition: tcp_rack.h:233
uint64_t tcp_sack_path_4
Definition: tcp_rack.h:208
uint64_t tcp_defer_opt
Definition: tcp_rack.h:229
uint64_t tcp_rack_abc_val
Definition: tcp_rack.h:223
uint64_t tcp_rack_idle_reduce_high
Definition: tcp_rack.h:187
uint64_t tcp_timely_dyn
Definition: tcp_rack.h:213
uint64_t tcp_rack_reord_fade
Definition: tcp_rack.h:181
uint64_t tcp_sack_path_3
Definition: tcp_rack.h:207
uint64_t tcp_gp_inc_ss
Definition: tcp_rack.h:197
uint64_t tcp_rack_pace_rate_ca
Definition: tcp_rack.h:190
uint64_t tcp_rack_pace_always
Definition: tcp_rack.h:174
uint64_t tcp_use_cmp_acks
Definition: tcp_rack.h:222
uint64_t tcp_rack_noprr
Definition: tcp_rack.h:211
uint64_t tcp_rack_tlp_thresh
Definition: tcp_rack.h:182
uint64_t tcp_rack_early_seg
Definition: tcp_rack.h:179
uint64_t tcp_rack_reord_thresh
Definition: tcp_rack.h:180
uint64_t tcp_hdwr_pacing
Definition: tcp_rack.h:196
uint64_t tcp_rack_dsack_opt
Definition: tcp_rack.h:234
uint64_t tcp_rack_fastrsm_hack
Definition: tcp_rack.h:230
uint64_t tcp_rack_tlp_reduce
Definition: tcp_rack.h:173
uint64_t tcp_rack_min_pace_seg
Definition: tcp_rack.h:189
uint64_t tcp_gp_inc_rec
Definition: tcp_rack.h:199
uint64_t tcp_profile
Definition: tcp_rack.h:218
uint64_t tcp_data_after_close
Definition: tcp_rack.h:228
uint64_t tcp_rack_rrr_no_conf_rate
Definition: tcp_rack.h:193
uint64_t tcp_pacing_up_only
Definition: tcp_rack.h:221
uint64_t tcp_rack_idle_reduce
Definition: tcp_rack.h:186
uint64_t tcp_fillcw
Definition: tcp_rack.h:215
uint64_t tcp_initial_rate
Definition: tcp_rack.h:194
uint64_t rack_no_timer_in_hpts
Definition: tcp_rack.h:188
uint64_t tcp_rack_pace_reduce
Definition: tcp_rack.h:175
uint64_t tcp_rack_pace_rate_ss
Definition: tcp_rack.h:201
uint64_t tcp_rack_pace_rate_rec
Definition: tcp_rack.h:202
uint64_t tcp_sack_path_2b
Definition: tcp_rack.h:206
uint64_t tcp_rack_measure_cnt
Definition: tcp_rack.h:225
uint64_t tcp_gp_inc_ca
Definition: tcp_rack.h:198
uint64_t tcp_rack_pkt_delay
Definition: tcp_rack.h:183
uint64_t tcp_rack_tlp_inc_var
Definition: tcp_rack.h:184
uint64_t tcp_hdwr_rate_cap
Definition: tcp_rack.h:219
uint64_t tcp_tlp_use
Definition: tcp_rack.h:185
uint64_t tcp_rack_delayed_ack
Definition: tcp_rack.h:226
uint64_t tcp_rack_prr_sendalot
Definition: tcp_rack.h:177
uint64_t tcp_rack_beta_ecn
Definition: tcp_rack.h:232
uint64_t tcp_sack_path_2a
Definition: tcp_rack.h:205
uint64_t tcp_rack_cfg_rate
Definition: tcp_rack.h:212
uint32_t rs_rtt_highest
Definition: tcp_rack.h:147
uint32_t rs_us_rtt
Definition: tcp_rack.h:149
uint64_t rs_rtt_tot
Definition: tcp_rack.h:151
int32_t confidence
Definition: tcp_rack.h:150
uint32_t rs_flags
Definition: tcp_rack.h:145
uint16_t rs_us_rtrcnt
Definition: tcp_rack.h:152
uint32_t rs_rtt_cnt
Definition: tcp_rack.h:148
uint32_t rs_rtt_lowest
Definition: tcp_rack.h:146
uint32_t r_nseq_appl
Definition: tcp_rack.h:64
uint8_t r_dupack
Definition: tcp_rack.h:65
struct mbuf * m
Definition: tcp_rack.h:61
uint8_t r_avail
Definition: tcp_rack.h:72
uint8_t r_hw_tls
Definition: tcp_rack.h:71
uint32_t r_fas
Definition: tcp_rack.h:76
uint32_t r_rtr_cnt
Definition: tcp_rack.h:60
uint64_t r_ack_arrival
Definition: tcp_rack.h:74
uint32_t soff
Definition: tcp_rack.h:62
uint8_t r_no_rtt_allowed
Definition: tcp_rack.h:70
uint8_t r_limit_type
Definition: tcp_rack.h:67
uint32_t r_flags
Definition: tcp_rack.h:59
RB_ENTRY(rack_sendmap) r_next
uint8_t r_in_tmap
Definition: tcp_rack.h:66
uint32_t orig_m_len
Definition: tcp_rack.h:63
uint32_t r_end
Definition: tcp_rack.h:57
TAILQ_ENTRY(rack_sendmap) r_tnext
uint8_t r_one_out_nr
Definition: tcp_rack.h:69
uint64_t r_tim_lastsent[RACK_NUM_OF_RETRANS]
Definition: tcp_rack.h:73
uint32_t r_rtr_bytes
Definition: tcp_rack.h:58
uint32_t r_start
Definition: tcp_rack.h:56
uint8_t r_just_ret
Definition: tcp_rack.h:68
uint8_t rc_tlp_in_progress
Definition: tcp_rack.h:586
int32_t(* r_substate)(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, struct tcpopt *, int32_t, int32_t, uint32_t, int, int, uint8_t)
Definition: tcp_rack.h:509
uint16_t rc_gp_incr
Definition: tcp_rack.h:567
uint16_t r_fsb_inited
Definition: tcp_rack.h:558
uint8_t r_state
Definition: tcp_rack.h:578
uint8_t rc_pace_fill_if_rttin_range
Definition: tcp_rack.h:589
uint8_t rack_hdw_pace_ena
Definition: tcp_rack.h:597
struct inpcb * rc_inp
Definition: tcp_rack.h:513
uint8_t r_early
Definition: tcp_rack.h:613
uint16_t r_up_only
Definition: tcp_rack.h:560
uint8_t rc_last_tlp_acked_set
Definition: tcp_rack.h:543
uint16_t r_via_fill_cw
Definition: tcp_rack.h:561
uint8_t rc_pace_to_cwnd
Definition: tcp_rack.h:588
uint16_t rc_gp_saw_ss
Definition: tcp_rack.h:623
uint16_t forced_ack
Definition: tcp_rack.h:566
uint8_t no_prr_addback
Definition: tcp_rack.h:517
uint16_t r_mbuf_queue
Definition: tcp_rack.h:550
uint8_t r_is_v6
Definition: tcp_rack.h:584
uint8_t rc_in_persist
Definition: tcp_rack.h:585
uint16_t rc_gp_filled
Definition: tcp_rack.h:576
uint8_t rack_no_prr
Definition: tcp_rack.h:603
uint8_t r_late
Definition: tcp_rack.h:614
uint16_t rc_gp_saw_rec
Definition: tcp_rack.h:621
struct rack_control r_ctl
Definition: tcp_rack.h:628
uint8_t r_timer_override
Definition: tcp_rack.h:583
uint8_t rack_attempted_scwnd
Definition: tcp_rack.h:602
uint8_t rc_tmr_stopped
Definition: tcp_rack.h:579
uint8_t rc_avail_bit
Definition: tcp_rack.h:617
uint8_t rack_scwnd_is_idle
Definition: tcp_rack.h:604
uint8_t defer_options
Definition: tcp_rack.h:519
uint8_t r_rr_config
Definition: tcp_rack.h:616
uint8_t rc_labc
Definition: tcp_rack.h:565
uint8_t rack_hdrw_pacing
Definition: tcp_rack.h:596
uint8_t rc_force_max_seg
Definition: tcp_rack.h:612
uint8_t rc_last_sent_tlp_seq_valid
Definition: tcp_rack.h:545
uint16_t r_use_cmp_ack
Definition: tcp_rack.h:554
uint16_t r_might_revert
Definition: tcp_rack.h:556
uint16_t in_probe_rtt
Definition: tcp_rack.h:625
uint8_t rc_always_pace
Definition: tcp_rack.h:587
TAILQ_ENTRY(tcp_rack) r_hpts
uint8_t rc_rack_tmr_std_based
Definition: tcp_rack.h:540
uint8_t rc_allow_data_af_clo
Definition: tcp_rack.h:605
uint16_t rc_highly_buffered
Definition: tcp_rack.h:572
uint16_t r_use_labc_for_rec
Definition: tcp_rack.h:571
uint16_t r_fast_output
Definition: tcp_rack.h:557
uint8_t rack_enable_scwnd
Definition: tcp_rack.h:601
uint16_t rc_gp_bwred
Definition: tcp_rack.h:568
uint8_t rc_srtt_measure_made
Definition: tcp_rack.h:590
uint16_t r_limit_scw
Definition: tcp_rack.h:552
uint8_t r_wanted_output
Definition: tcp_rack.h:615
uint16_t rc_gp_no_rec_chg
Definition: tcp_rack.h:624
uint8_t do_detection
Definition: tcp_rack.h:611
uint8_t set_pacing_done_a_iw
Definition: tcp_rack.h:607
uint8_t delayed_ack
Definition: tcp_rack.h:606
uint16_t rc_gp_saw_ca
Definition: tcp_rack.h:622
uint8_t probe_not_answered
Definition: tcp_rack.h:547
uint16_t rc_dack_mode
Definition: tcp_rack.h:574
uint8_t rc_on_min_to
Definition: tcp_rack.h:582
uint8_t app_limited_needs_set
Definition: tcp_rack.h:591
uint16_t r_rack_hw_rate_caps
Definition: tcp_rack.h:559
uint8_t rc_ack_can_sendout_data
Definition: tcp_rack.h:521
uint8_t gp_ready
Definition: tcp_rack.h:518
uint8_t rack_rec_nonrxt_use_cr
Definition: tcp_rack.h:600
uint8_t rc_free_cnt
Definition: tcp_rack.h:514
uint16_t rc_init_win
Definition: tcp_rack.h:618
uint8_t client_bufferlvl
Definition: tcp_rack.h:516
uint8_t r_rep_reverse
Definition: tcp_rack.h:595
uint32_t rc_rack_rtt
Definition: tcp_rack.h:549
uint16_t rc_is_spare
Definition: tcp_rack.h:577
uint8_t use_fixed_rate
Definition: tcp_rack.h:592
uint8_t fast_rsm_hack
Definition: tcp_rack.h:520
uint8_t rc_has_collapsed
Definition: tcp_rack.h:593
uint8_t sack_attack_disable
Definition: tcp_rack.h:610
uint8_t rc_rack_use_dsack
Definition: tcp_rack.h:541
uint16_t r_must_retran
Definition: tcp_rack.h:553
uint8_t r_rep_attack
Definition: tcp_rack.h:594
uint8_t t_timers_stopped
Definition: tcp_rack.h:580
uint16_t rtt_limit_mul
Definition: tcp_rack.h:551
uint16_t rc_gp_dyn_mul
Definition: tcp_rack.h:620
uint16_t measure_saw_probe_rtt
Definition: tcp_rack.h:626
uint16_t rc_gp_timely_dec_cnt
Definition: tcp_rack.h:570
uint8_t rc_last_tlp_past_cumack
Definition: tcp_rack.h:544
uint8_t use_rack_rr
Definition: tcp_rack.h:608
uint16_t r_fill_less_agg
Definition: tcp_rack.h:562
uint8_t avail_bytes
Definition: tcp_rack.h:548
struct tcpcb * rc_tp
Definition: tcp_rack.h:512
uint16_t r_ent_rec_ns
Definition: tcp_rack.h:555
uint16_t rc_gp_rtt_set
Definition: tcp_rack.h:619
uint16_t rc_dack_toggle
Definition: tcp_rack.h:575
uint8_t rc_last_sent_tlp_past_cumack
Definition: tcp_rack.h:546
uint8_t rc_user_set_max_segs
Definition: tcp_rack.h:564
uint16_t rc_gp_timely_inc_cnt
Definition: tcp_rack.h:569
uint8_t rack_attempt_hdwr_pace
Definition: tcp_rack.h:598
uint16_t rc_dragged_bottom
Definition: tcp_rack.h:573
uint8_t rc_dsack_round_seen
Definition: tcp_rack.h:542
uint8_t rc_enobuf
Definition: tcp_rack.h:581
uint8_t rack_tlp_threshold_use
Definition: tcp_rack.h:599
uint8_t alloc_limit_reported
Definition: tcp_rack.h:609
uint8_t rc_pacing_cc_set
Definition: tcp_rack.h:528
Definition: tcp_var.h:132
Definition: udp.h:45
#define HPTS_USEC_IN_SEC
Definition: tcp_hpts.h:35
#define HPTS_MSEC_IN_SEC
Definition: tcp_hpts.h:36
counter_u64_t rack_opts_arry[RACK_OPTS_SIZE]
Definition: rack.c:388
struct tcp_rack __aligned(CACHE_LINE_SIZE)
uint64_t rack_to_usec_ts(struct timeval *tv)
Definition: tcp_rack.h:105
uint32_t rack_ts_to_msec(uint64_t ts)
Definition: tcp_rack.h:111
TAILQ_HEAD(rack_head, rack_sendmap)
#define RACK_OPTS_SIZE
Definition: tcp_rack.h:267
RB_HEAD(rack_rb_tree_head, rack_sendmap)
#define RACK_NUM_OF_RETRANS
Definition: tcp_rack.h:48