FreeBSD kernel IPv4 code
tcp_bbr.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 */
28#ifndef _NETINET_TCP_BBR_H_
29#define _NETINET_TCP_BBR_H_
31#define BBR_INITIAL_RTO 1000000 /* 1 second in micro-seconds */
32/* Send map flags */
33#define BBR_ACKED 0x0001 /* The remote endpoint acked this */
34#define BBR_WAS_RENEGED 0x0002 /* The peer reneged the ack */
35#define BBR_RXT_CLEARED 0x0004 /* ACK Cleared by the RXT timer */
36#define BBR_OVERMAX 0x0008 /* We have more retran's then we can
37 * fit */
38#define BBR_SACK_PASSED 0x0010 /* A sack was done above this block */
39#define BBR_WAS_SACKPASS 0x0020 /* We retransmitted due to SACK pass */
40#define BBR_HAS_FIN 0x0040 /* segment is sent with fin */
41#define BBR_TLP 0x0080 /* segment sent as tail-loss-probe */
42#define BBR_HAS_SYN 0x0100 /* segment has the syn */
43#define BBR_MARKED_LOST 0x0200 /*
44 * This segments is lost and
45 * totaled into bbr->rc_ctl.rc_lost
46 */
47#define BBR_RWND_COLLAPSED 0x0400 /* The peer collapsed the rwnd on the segment */
48#define BBR_NUM_OF_RETRANS 7
50/* Defines for socket options to set pacing overheads */
51#define BBR_INCL_ENET_OH 0x01
52#define BBR_INCL_IP_OH 0x02
53#define BBR_INCL_TCP_OH 0x03
55/*
56 * With the addition of both measurement algorithms
57 * I had to move over the size of a
58 * cache line (unfortunately). For now there is
59 * no way around this. We may be able to cut back
60 * at some point I hope.
61 */
63 TAILQ_ENTRY(bbr_sendmap) r_next; /* seq number arrayed next */
64 TAILQ_ENTRY(bbr_sendmap) r_tnext; /* Time of tmit based next */
65 uint32_t r_start; /* Sequence number of the segment */
66 uint32_t r_end; /* End seq, this is 1 beyond actually */
68 uint32_t r_rtr_bytes; /* How many bytes have been retransmitted */
69 uint32_t r_delivered; /* Delivered amount at send */
71 uint32_t r_del_time; /* The time of the last delivery update */
72 uint8_t r_rtr_cnt:4, /* Retran count, index this -1 to get time
73 * sent */
74 r_rtt_not_allowed:1, /* No rtt measurement allowed */
75 r_is_drain:1, /* In a draining cycle */
76 r_app_limited:1,/* We went app limited */
77 r_ts_valid:1; /* Timestamp field is valid (r_del_ack_ts) */
78 uint8_t r_dupack; /* Dup ack count */
79 uint8_t r_in_tmap:1, /* Flag to see if its in the r_tnext array */
80 r_is_smallmap:1,/* Was logged as a small-map send-map item */
81 r_is_gain:1, /* Was in gain cycle */
82 r_bbr_state:5; /* The BBR state at send */
83 uint8_t r_limit_type; /* is this entry counted against a limit? */
84
85 uint16_t r_flags; /* Flags as defined above */
87 uint32_t r_del_ack_ts; /* At send what timestamp of peer was (if r_ts_valid set) */
88 /****************Cache line*****************/
90 /*
91 * Question, should we instead just grab the sending b/w
92 * from the filter with the gain and store it in a
93 * uint64_t instead?
94 */
95 uint32_t r_first_sent_time; /* Time of first pkt in flight sent */
96 uint32_t r_pacing_delay; /* pacing delay of this send */
97 uint32_t r_flight_at_send; /* flight at the time of the send */
98#ifdef _KERNEL
99} __aligned(CACHE_LINE_SIZE);
100#else
102#endif
103#define BBR_LIMIT_TYPE_SPLIT 1
104
107#define BBR_SEGMENT_TIME_SIZE 1500 /* How many bytes in time_between */
109#define BBR_MIN_SEG 1460 /* MSS size */
110#define BBR_MAX_GAIN_VALUE 0xffff
112#define BBR_TIMER_FUDGE 1500 /* 1.5ms in micro seconds */
114/* BW twiddle secret codes */
115#define BBR_RED_BW_CONGSIG 0 /* We enter recovery and set using b/w */
116#define BBR_RED_BW_RATECAL 1 /* We are calculating the loss rate */
117#define BBR_RED_BW_USELRBW 2 /* We are dropping the lower b/w with
118 * cDR */
119#define BBR_RED_BW_SETHIGHLOSS 3 /* We have set our highloss value at
120 * exit from probe-rtt */
121#define BBR_RED_BW_PE_CLREARLY 4 /* We have decided to clear the
122 * reduction early */
123#define BBR_RED_BW_PE_CLAFDEL 5 /* We are clearing it on schedule
124 * delayed */
125#define BBR_RED_BW_REC_ENDCLL 6 /* Recover exits save high if needed
126 * an clear to start measuring */
127#define BBR_RED_BW_PE_NOEARLY_OUT 7 /* Set pkt epoch judged that we do not
128 * get out of jail early */
129/* For calculating a rate */
130#define BBR_CALC_BW 1
131#define BBR_CALC_LOSS 2
133#define BBR_RTT_BY_TIMESTAMP 0
134#define BBR_RTT_BY_EXACTMATCH 1
135#define BBR_RTT_BY_EARLIER_RET 2
136#define BBR_RTT_BY_THIS_RETRAN 3
137#define BBR_RTT_BY_SOME_RETRAN 4
138#define BBR_RTT_BY_TSMATCHING 5
140/* Markers to track where we enter persists from */
141#define BBR_PERSISTS_FROM_1 1
142#define BBR_PERSISTS_FROM_2 2
143#define BBR_PERSISTS_FROM_3 3
144#define BBR_PERSISTS_FROM_4 4
145#define BBR_PERSISTS_FROM_5 5
146
147/* magic cookies to ask for the RTT */
148#define BBR_RTT_PROP 0
149#define BBR_RTT_RACK 1
150#define BBR_RTT_PKTRTT 2
151#define BBR_SRTT 3
152
153#define BBR_SACKED 0
154#define BBR_CUM_ACKED 1
155
156/* threshold in useconds where we consider we need a higher min cwnd */
157#define BBR_HIGH_SPEED 1000
158#define BBR_HIGHSPEED_NUM_MSS 12
160#define MAX_REDUCE_RXT 3 /* What is the maximum times we are willing to
161 * reduce b/w in RTX's. Setting this has a
162 * multiplicative effect e.g. if we are
163 * reducing by 20% then setting it to 3 means
164 * you will have reduced the b/w estimate by >
165 * 60% before you stop. */
167 * We use the rate sample structure to
168 * assist in single sack/ack rate and rtt
169 * calculation. In the future we will expand
170 * this in BBR to do forward rate sample
171 * b/w estimation.
172 */
173#define BBR_RS_RTT_EMPTY 0x00000001 /* Nothing yet stored in RTT's */
174#define BBR_RS_BW_EMPTY 0x00000002 /* Nothing yet stored in cDR */
175#define BBR_RS_RTT_VALID 0x00000004 /* We have at least one valid RTT */
176#define BBR_RS_BW_VAILD 0x00000008 /* We have a valid cDR */
177#define BBR_RS_EMPTY (BBR_RS_RTT_EMPTY|BBR_RS_BW_EMPTY)
187 uint64_t rs_rtt_tot;
194 uint64_t rs_cDR;
195};
197/* RTT shrink reasons */
198#define BBR_RTTS_INIT 0
199#define BBR_RTTS_NEWRTT 1
200#define BBR_RTTS_RTTPROBE 2
201#define BBR_RTTS_WASIDLE 3
202#define BBR_RTTS_PERSIST 4
203#define BBR_RTTS_REACHTAR 5
204#define BBR_RTTS_ENTERPROBE 6
205#define BBR_RTTS_SHRINK_PG 7
206#define BBR_RTTS_SHRINK_PG_FINAL 8
207#define BBR_RTTS_NEW_TARGET 9
208#define BBR_RTTS_LEAVE_DRAIN 10
209#define BBR_RTTS_RESETS_VALUES 11
210
211#define BBR_NUM_RATES 5
212/* Rate flags */
213#define BBR_RT_FLAG_FREE 0x00 /* Is on the free list */
214#define BBR_RT_FLAG_INUSE 0x01 /* Has been allocated */
215#define BBR_RT_FLAG_READY 0x02 /* Ready to initiate a measurement. */
216#define BBR_RT_FLAG_CAPPED_PRE 0x04 /* Ready to cap if we send the next segment */
217#define BBR_RT_FLAG_CAPPED 0x08 /* Measurement is capped */
218#define BBR_RT_FLAG_PASTFA 0x10 /* Past the first ack. */
219#define BBR_RT_FLAG_LIMITED 0x20 /* Saw application/cwnd or rwnd limited period */
220#define BBR_RT_SEEN_A_ACK 0x40 /* A ack has been saved */
221#define BBR_RT_PREV_RTT_SET 0x80 /* There was a RTT set in */
222#define BBR_RT_PREV_SEND_TIME 0x100 /*
223 *There was a RTT send time set that can be used
224 * no snd_limits
225 */
226#define BBR_RT_SET_GRADIENT 0x200
227#define BBR_RT_TS_VALID 0x400
229struct bbr_log {
230 union {
231 struct bbr_sendmap *rsm; /* For alloc/free */
232 uint64_t sb_acc; /* For out/ack or t-o */
233 };
234 struct tcpcb *tp;
246 uint32_t applimited; /* UU */
247 /* Things for BBR */
249 uint64_t cur_del_rate; /* UU */
250 uint64_t delRate; /* UU */
251 uint64_t rttProp; /* UU */
252 uint64_t lt_bw; /* UU */
255 uint32_t slot; /* UU */
262 uint32_t epoch; /* UU */
263 uint32_t lt_epoch; /* UU */
264 /* Sack fun */
265 uint32_t blk_start[4]; /* xx */
266 uint32_t blk_end[4];
267 uint32_t len; /* Timeout T3=1, TLP=2, RACK=3 */
270 uint8_t applied; /* UU */
271 uint8_t inhpts; /* UU */
272 uint8_t __spare; /* UU */
274};
279 struct bbr_log entries[0];
280};
281
282/*
283 * Magic numbers for logging timeout events if the
284 * logging is enabled.
285 */
286#define BBR_TO_FRM_TMR 1
287#define BBR_TO_FRM_TLP 2
288#define BBR_TO_FRM_RACK 3
289#define BBR_TO_FRM_KEEP 4
290#define BBR_TO_FRM_PERSIST 5
291#define BBR_TO_FRM_DELACK 6
292
293#define BBR_SEES_STRETCH_ACK 1
294#define BBR_SEES_COMPRESSED_ACKS 2
295
296/*
297 * As we get each SACK we wade through the
298 * rc_map and mark off what is acked.
299 * We also increment rc_sacked as well.
300 *
301 * We also pay attention to missing entries
302 * based on the time and possibly mark them
303 * for retransmit. If we do and we are not already
304 * in recovery we enter recovery. In doing
305 * so we claer prr_delivered/holes_rxt and prr_sent_dur_rec.
306 * We also setup rc_next/rc_snd_nxt/rc_send_end so
307 * we will know where to send from. When not in
308 * recovery rc_next will be NULL and rc_snd_nxt should
309 * equal snd_max.
311 * Whenever we retransmit from recovery we increment
312 * rc_holes_rxt as we retran a block and mark it as retransmitted
313 * with the time it was sent. During non-recovery sending we
314 * add to our map and note the time down of any send expanding
315 * the rc_map at the tail and moving rc_snd_nxt up with snd_max.
317 * In recovery during SACK/ACK processing if a chunk has
318 * been retransmitted and it is now acked, we decrement rc_holes_rxt.
319 * When we retransmit from the scoreboard we use
320 * rc_next and rc_snd_nxt/rc_send_end to help us
321 * find what needs to be retran.
323 * To calculate pipe we simply take (snd_max - snd_una) + rc_holes_rxt
324 * This gets us the effect of RFC6675 pipe, counting twice for
325 * bytes retransmitted.
326 */
328#define TT_BBR_FR_TMR 0x2001
329
330#define BBR_SCALE 8
331#define BBR_UNIT (1 << BBR_SCALE)
332
333#define BBR_NUM_RTTS_FOR_DEL_LIMIT 8 /* How many pkt-rtts do we keep
334 * Delivery rate for */
335#define BBR_NUM_RTTS_FOR_GOOG_DEL_LIMIT 10 /* How many pkt-rtts do we keep
336 * Delivery rate for google */
338#define BBR_SECONDS_NO_RTT 10 /* 10 seconds with no RTT shrinkage */
339#define BBR_PROBERTT_MAX 200 /* 200ms */
340#define BBR_PROBERTT_NUM_MSS 4
341#define BBR_STARTUP_EPOCHS 3
342#define USECS_IN_MSEC 1000
343#define BBR_TIME_TO_SECONDS(a) (a / USECS_IN_SECOND)
344#define BBR_TIME_TO_MILLI(a) (a / MS_IN_USEC)
346/* BBR keeps time in usec's so we divide by 1000 and round up */
347#define BBR_TS_TO_MS(t) ((t+999)/MS_IN_USEC)
350 * Locking for the rack control block.
351 * a) Locked by INP_WLOCK
352 * b) Locked by the hpts-mutex
354 */
355#define BBR_STATE_STARTUP 0x01
356#define BBR_STATE_DRAIN 0x02
357#define BBR_STATE_PROBE_BW 0x03
358#define BBR_STATE_PROBE_RTT 0x04
359#define BBR_STATE_IDLE_EXIT 0x05
361/* Substate defines for STATE == PROBE_BW */
362#define BBR_SUB_GAIN 0 /* State 0 where we are 5/4 BBR_UNIT */
363#define BBR_SUB_DRAIN 1 /* State 1 where we are at 3/4 BBR_UNIT */
364#define BBR_SUB_LEVEL1 2 /* State 1 first BBR_UNIT */
365#define BBR_SUB_LEVEL2 3 /* State 2nd BBR_UNIT */
366#define BBR_SUB_LEVEL3 4 /* State 3rd BBR_UNIT */
367#define BBR_SUB_LEVEL4 5 /* State 4th BBR_UNIT */
368#define BBR_SUB_LEVEL5 6 /* State 5th BBR_UNIT */
369#define BBR_SUB_LEVEL6 7 /* State last BBR_UNIT */
370#define BBR_SUBSTATE_COUNT 8
372/* Single remaining reduce log */
373#define BBR_REDUCE_AT_FR 5
375#define BBR_BIG_LOG_SIZE 300000
377struct bbr_stats {
378 uint64_t bbr_badfr; /* 0 */
379 uint64_t bbr_badfr_bytes; /* 1 */
380 uint64_t bbr_saw_oerr; /* 2 */
381 uint64_t bbr_saw_emsgsiz; /* 3 */
382 uint64_t bbr_reorder_seen; /* 4 */
383 uint64_t bbr_tlp_tot; /* 5 */
384 uint64_t bbr_tlp_newdata; /* 6 */
385 uint64_t bbr_offset_recovery; /* 7 */
386 uint64_t bbr_tlp_retran_fail; /* 8 */
387 uint64_t bbr_to_tot; /* 9 */
388 uint64_t bbr_to_arm_rack; /* 10 */
389 uint64_t bbr_enter_probertt; /* 11 */
390 uint64_t bbr_tlp_set; /* 12 */
391 uint64_t bbr_resends_set; /* 13 */
392 uint64_t bbr_force_output; /* 14 */
393 uint64_t bbr_to_arm_tlp; /* 15 */
394 uint64_t bbr_paced_segments; /* 16 */
395 uint64_t bbr_saw_enobuf; /* 17 */
396 uint64_t bbr_to_alloc_failed; /* 18 */
397 uint64_t bbr_to_alloc_emerg; /* 19 */
398 uint64_t bbr_sack_proc_all; /* 20 */
399 uint64_t bbr_sack_proc_short; /* 21 */
400 uint64_t bbr_sack_proc_restart; /* 22 */
401 uint64_t bbr_to_alloc; /* 23 */
402 uint64_t bbr_offset_drop; /* 24 */
403 uint64_t bbr_runt_sacks; /* 25 */
404 uint64_t bbr_sack_passed; /* 26 */
405 uint64_t bbr_rlock_left_ret0; /* 27 */
406 uint64_t bbr_rlock_left_ret1; /* 28 */
407 uint64_t bbr_dynamic_rwnd; /* 29 */
408 uint64_t bbr_static_rwnd; /* 30 */
409 uint64_t bbr_sack_blocks; /* 31 */
410 uint64_t bbr_sack_blocks_skip; /* 32 */
411 uint64_t bbr_sack_search_both; /* 33 */
412 uint64_t bbr_sack_search_fwd; /* 34 */
413 uint64_t bbr_sack_search_back; /* 35 */
414 uint64_t bbr_plain_acks; /* 36 */
415 uint64_t bbr_acks_with_sacks; /* 37 */
416 uint64_t bbr_progress_drops; /* 38 */
417 uint64_t bbr_early; /* 39 */
418 uint64_t bbr_reneges_seen; /* 40 */
419 uint64_t bbr_persist_reneg; /* 41 */
420 uint64_t bbr_dropped_af_data; /* 42 */
421 uint64_t bbr_failed_mbuf_aloc; /* 43 */
422 uint64_t bbr_cwnd_limited; /* 44 */
423 uint64_t bbr_rwnd_limited; /* 45 */
424 uint64_t bbr_app_limited; /* 46 */
425 uint64_t bbr_force_timer_start; /* 47 */
426 uint64_t bbr_hpts_min_time; /* 48 */
427 uint64_t bbr_meets_tso_thresh; /* 49 */
428 uint64_t bbr_miss_tso_rwnd; /* 50 */
429 uint64_t bbr_miss_tso_cwnd; /* 51 */
430 uint64_t bbr_miss_tso_app; /* 52 */
431 uint64_t bbr_miss_retran; /* 53 */
432 uint64_t bbr_miss_tlp; /* 54 */
433 uint64_t bbr_miss_unknown; /* 55 */
434 uint64_t bbr_hdwr_rl_add_ok; /* 56 */
435 uint64_t bbr_hdwr_rl_add_fail; /* 57 */
436 uint64_t bbr_hdwr_rl_mod_ok; /* 58 */
437 uint64_t bbr_hdwr_rl_mod_fail; /* 59 */
438 uint64_t bbr_collapsed_win; /* 60 */
439 uint64_t bbr_alloc_limited; /* 61 */
440 uint64_t bbr_alloc_limited_conns; /* 62 */
441 uint64_t bbr_split_limited; /* 63 */
445 * The structure bbr_opt_stats is a simple
446 * way to see how many options are being
447 * changed in the stack.
448 */
467 uint64_t tcp_bbr_lowgain_thresh;
482 uint64_t tcp_iwnd_tso;
483 uint64_t tcp_utter_max_tso;
484 uint64_t tcp_hdwr_pacing;
486 uint64_t tcp_floor_min_tso;
487 /* New */
490 uint64_t tcp_bbr_probertt_len;
493 uint64_t tcp_use_rackcheat;
494 uint64_t tcp_delack;
495 uint64_t tcp_maxpeak;
497 uint64_t tcp_data_ac;
502};
504#ifdef _KERNEL
505#define BBR_STAT_SIZE (sizeof(struct bbr_stats)/sizeof(uint64_t))
506extern counter_u64_t bbr_stat_arry[BBR_STAT_SIZE];
507#define BBR_STAT_ADD(name, amm) counter_u64_add(bbr_stat_arry[(offsetof(struct bbr_stats, name)/sizeof(uint64_t))], (amm))
508#define BBR_STAT_INC(name) BBR_STAT_ADD(name, 1)
509#define BBR_OPTS_SIZE (sizeof(struct bbr_stats)/sizeof(uint64_t))
510extern counter_u64_t bbr_opts_arry[BBR_OPTS_SIZE];
511#define BBR_OPTS_ADD(name, amm) counter_u64_add(bbr_opts_arry[(offsetof(struct bbr_opts_stats, name)/sizeof(uint64_t))], (amm))
512#define BBR_OPTS_INC(name) BBR_OPTS_ADD(name, 1)
513#endif
514
515#define BBR_NUM_LOSS_RATES 3
516#define BBR_NUM_BW_RATES 3
517
518#define BBR_RECOVERY_LOWRTT 1
519#define BBR_RECOVERY_MEDRTT 2
520#define BBR_RECOVERY_HIGHRTT 3
521#define BBR_RECOVERY_EXTREMERTT 4
522
524 /*******************************/
525 /* Cache line 2 from bbr start */
526 /*******************************/
527 struct bbr_head rc_map; /* List of all segments Lock(a) */
528 struct bbr_head rc_tmap; /* List in transmit order Lock(a) */
529 struct bbr_sendmap *rc_resend; /* something we have been asked to
530 * resend */
531 uint32_t rc_last_delay_val; /* How much we expect to delay Lock(a) */
532 uint32_t rc_bbr_hptsi_gain:16, /* Current hptsi gain Lock(a) */
533 rc_hpts_flags:16; /* flags on whats on the pacer wheel */
534
535 uint32_t rc_delivered; /* BRR delivered amount Lock(a) */
536 uint32_t rc_hptsi_agg_delay; /* How much time are we behind */
539 uint32_t rc_lost_bytes; /* Total bytes currently marked lost */
540 /*******************************/
541 /* Cache line 3 from bbr start */
542 /*******************************/
543 struct time_filter rc_delrate;
544 /*******************************/
545 /* Cache line 4 from bbr start */
546 /*******************************/
547 struct bbr_head rc_free; /* List of Free map entries Lock(a) */
548 struct bbr_sendmap *rc_tlp_send; /* something we have been
549 * asked to resend */
551 uint32_t rc_target_at_state; /* Target for a state */
552
553 uint16_t rc_free_cnt; /* Number of free entries on the rc_free list
554 * Lock(a) */
556
557 uint32_t cur_rtt; /* Last RTT from ack */
559 uint32_t rc_went_idle_time; /* Used for persits to see if its
560 * probe-rtt qualified */
561 uint32_t rc_pace_max_segs:17, /* How much in any single TSO we send Lock(a) */
562 rc_pace_min_segs:15; /* The minimum single segment size before we enter persists */
564 uint32_t rc_rtt_shrinks; /* Time of last rtt shrinkage Lock(a) */
566 uint32_t rc_timer_exp; /* If a timer ticks of expiry */
567 uint32_t rc_rcv_epoch_start; /* Start time of the Epoch Lock(a) */
568
569 /*******************************/
570 /* Cache line 5 from bbr start */
571 /*******************************/
572
573 uint32_t rc_lost_at_pktepoch; /* what the lost value was at the last
574 * pkt-epoch */
575 uint32_t r_measurement_count; /* count of measurement applied lock(a) */
576
577 uint32_t rc_last_tlp_seq; /* Last tlp sequence Lock(a) */
578 uint16_t rc_reorder_shift; /* Socket option value Lock(a) */
579 uint16_t rc_pkt_delay; /* Socket option value Lock(a) */
580
581 struct bbr_sendmap *rc_sacklast; /* sack remembered place
582 * Lock(a) */
583 struct bbr_sendmap *rc_next; /* remembered place where we next
584 * retransmit at Lock(a) */
585
586 uint32_t rc_sacked; /* Tot sacked on scoreboard Lock(a) */
587 uint32_t rc_holes_rxt; /* Tot retraned from scoreboard Lock(a) */
589 uint32_t rc_reorder_ts; /* Last time we saw reordering Lock(a) */
590 uint32_t rc_init_rwnd; /* Initial rwnd when we transitioned */
591 /*- ---
592 * used only initial and close
593 */
594 uint32_t rc_high_rwnd; /* Highest rwnd seen */
595 uint32_t rc_lowest_rtt; /* Smallest RTT we have seen */
597 uint32_t rc_last_rtt; /* Last valid measured RTT that ack'd data */
600 /*******************************/
601 /* Cache line 6 from bbr start */
602 /*******************************/
603 struct sack_filter bbr_sf;
604
605 /*******************************/
606 /* Cache line 7 from bbr start */
607 /*******************************/
608 struct time_filter_small rc_rttprop;
609 uint32_t last_inbound_ts; /* Peers last timestamp */
610
616 uint32_t rc_lt_epoch_use; /* When we started lt-bw use Lock(a) */
618 uint32_t rc_recovery_start; /* Time we start recovery Lock(a) */
619 uint32_t rc_lt_del; /* Delivered at lt bw sampling start Lock(a) */
621 uint64_t rc_bbr_cur_del_rate; /* Current measured delivery rate
622 * Lock(a) */
624 /*******************************/
625 /* Cache line 8 from bbr start */
626 /*******************************/
627 uint32_t rc_cwnd_on_ent; /* On entry to recovery the cwnd
628 * Lock(a) */
629 uint32_t rc_agg_early; /* aggregate amount early */
630
631 uint32_t rc_rcvtime; /* When we last received data Lock(a) */
632 uint32_t rc_pkt_epoch_del; /* seq num that we need for RTT epoch */
633
634 uint32_t rc_pkt_epoch; /* Epoch based on packet RTTs */
635 uint32_t rc_pkt_epoch_time; /* Time we started the pkt epoch */
637 uint32_t rc_pkt_epoch_rtt; /* RTT using the packet epoch */
638 uint32_t rc_rtt_epoch; /* Current RTT epoch, it ticks every rttProp
639 * Lock(a) */
642
643 uint32_t rc_lt_epoch; /* LT epoch start of bw_sampling */
645
647 uint32_t rc_bbr_last_startup_epoch; /* Last startup epoch where we
648 * increased 20% */
649 uint32_t rc_bbr_enters_probertt; /* Timestamp we entered
650 * probertt Lock(a) */
651 uint32_t rc_lt_time; /* Time of lt sampling start Lock(a) */
652
653 /*******************************/
654 /* Cache line 9 from bbr start */
655 /*******************************/
656 uint64_t rc_lt_bw; /* LT bw calculated Lock(a) */
657 uint64_t rc_bbr_lastbtlbw; /* For startup, what was last btlbw I
658 * saw to check the 20% gain Lock(a) */
659
660 uint32_t rc_bbr_cwnd_gain; /* Current cwnd gain Lock(a) */
661 uint32_t rc_pkt_epoch_loss_rate; /* pkt-epoch loss rate */
663 uint32_t rc_saved_cwnd; /* Saved cwnd during Probe-rtt drain Lock(a) */
665
666 uint32_t rc_lost; /* Number of bytes lost Lock(a) */
667 uint32_t rc_exta_time_gd; /* How much extra time we got in d/g */
668
669 uint32_t rc_lt_lost; /* Number of lt bytes lost at sampling start
670 * Lock(a) */
673 uint32_t rc_min_to; /* Socket option value Lock(a) */
674 uint32_t rc_initial_hptsi_bw; /* Our initial startup bw Lock(a) */
676 uint32_t bbr_lost_at_state; /* Temp counter debug lost value as we
677 * enter a state */
678 /*******************************/
679 /* Cache line 10 from bbr start */
680 /*******************************/
684 uint64_t red_bw;
687 uint32_t rc_probertt_srttchktim; /* Time we last did a srtt
688 * check */
689 uint32_t gain_epoch; /* Epoch we should be out of gain */
692 uint32_t rc_reorder_fade; /* Socket option value Lock(a) */
700 /*******************************/
701 /* Cache line 11 from bbr start */
702 /*******************************/
703 uint32_t cur_rtt_send_time; /* Time we sent our rtt measured packet */
704 uint32_t bbr_peer_tsratio; /* Our calculated ts ratio to multply */
705 uint32_t bbr_ts_check_tstmp; /* When we filled it the TS that came on the ack */
706 uint32_t bbr_ts_check_our_cts; /* When we filled it the cts of the send */
709 uint32_t bbr_hdwr_cnt_noset_snt; /* count of hw pacing sends during delay */
712 uint32_t highest_hdwr_delay; /* Largest delay we have seen from hardware */
714 uint32_t recovery_lr; /* The sum of the loss rate from the pe's during recovery */
716 uint32_t flightsize_at_drain; /* In draining what was the last marked flight size */
717 uint32_t rc_pe_of_prtt; /* PE we went into probe-rtt */
718 uint32_t ts_in; /* ts that went with the last rtt */
719
720 uint16_t rc_tlp_seg_send_cnt; /* Number of times we have TLP sent
721 * rc_last_tlp_seq Lock(a) */
723 uint32_t rc_num_maps_alloced; /* num send map entries allocated */
724 uint32_t rc_num_split_allocs; /* num split map entries allocated */
725 uint16_t rc_num_small_maps_alloced; /* Number of sack blocks
726 * allocated */
733};
735struct socket;
736struct tcp_bbr {
737 /* First cache line 0x00 */
738 int32_t(*r_substate) (struct mbuf *, struct tcphdr *,
739 struct socket *, struct tcpcb *, struct tcpopt *,
740 int32_t, int32_t, uint32_t, int32_t, int32_t, uint8_t); /* Lock(a) */
741 struct tcpcb *rc_tp; /* The tcpcb Lock(a) */
742 struct inpcb *rc_inp; /* The inpcb Lock(a) */
743 struct timeval rc_tv;
744 uint32_t rc_pacer_started; /* Time we started the pacer */
745 uint16_t no_pacing_until:8, /* No pacing until N packet epochs */
746 ts_can_raise:1,/* TS b/w calculations can raise the bw higher */
747 skip_gain:1, /* Skip the gain cycle (hardware pacing) */
748 gain_is_limited:1, /* With hardware pacing we are limiting gain */
751 hw_pacing_set:1; /* long enough has passed for us to start pacing */
752 uint16_t xxx_r_ack_count; /* During recovery count of ack's received
753 * that added data since output */
754 uint16_t bbr_segs_rcvd; /* In Segment count since we sent a ack */
756 uint8_t bbr_timer_src:4, /* Used for debugging Lock(a) */
757 bbr_use_rack_cheat:1, /* Use the rack cheat */
758 bbr_init_win_cheat:1, /* Send full IW for TSO */
759 bbr_attempt_hdwr_pace:1,/* Try to do hardware pacing */
760 bbr_hdrw_pacing:1; /* Hardware pacing is available */
761 uint8_t bbr_hdw_pace_ena:1, /* Does the connection allow hardware pacing to be attempted */
762 bbr_prev_in_rec:1, /* We were previously in recovery */
765 xxx_bbr_hdw_pace_idx:4; /* If hardware pacing is on, index to slot in pace tbl */
783 uint8_t r_state:4, /* Current bbr state Lock(a) */
784 r_agg_early_set:1, /* Did we get called early */
786 r_use_policer:1, /* For google mode only */
788 uint8_t r_timer_override:1, /* pacer override Lock(a) 0/1 */
792 rc_tlp_rtx_out:1, /* A TLP is in flight */
793 rc_tlp_in_progress:1, /* a TLP timer is running needed? */
794 rc_use_idle_restart:1; /* Do we restart fast after idle (persist or applim) */
795 uint8_t rc_bbr_state:3, /* What is the major BBR state */
796 rc_bbr_substate:3, /* For probeBW state */
797 r_is_v6:1,
800 uint8_t rc_tlp_threshold; /* Socket option value Lock(a) */
802 uint8_t rc_cwnd_limited:1, /* We are cwnd limited */
803 rc_tmr_stopped:7; /* What timers have been stopped */
806 rc_ts_data_set:1, /* We have filled a set point to determine */
807 rc_ts_clock_set:1, /* We have determined the ts type */
808 rc_ts_cant_be_used:1, /* We determined we can't use ts values */
810 rc_no_pacing:1,
813 /* Cache line 2 0x40 */
814 struct bbr_control r_ctl;
815#ifdef _KERNEL
816} __aligned(CACHE_LINE_SIZE);
817#else
818};
819#endif
820
821#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
const struct tcp_hwrate_limit_table * crte
Definition: tcp_bbr.h:663
uint32_t rc_last_tlp_seq
Definition: tcp_bbr.h:557
uint16_t rc_num_small_maps_alloced
Definition: tcp_bbr.h:705
uint32_t rc_rtt_epoch
Definition: tcp_bbr.h:618
uint32_t last_startup_measure
Definition: tcp_bbr.h:673
uint32_t rc_exta_time_gd
Definition: tcp_bbr.h:647
uint32_t rc_del_time
Definition: tcp_bbr.h:530
uint32_t rc_flight_at_input
Definition: tcp_bbr.h:518
uint32_t rc_lt_epoch
Definition: tcp_bbr.h:623
uint32_t rc_lt_lost
Definition: tcp_bbr.h:649
uint64_t rc_bbr_lastbtlbw
Definition: tcp_bbr.h:637
uint16_t bbr_hptsi_bytes_min
Definition: tcp_bbr.h:707
uint32_t rc_init_rwnd
Definition: tcp_bbr.h:570
uint32_t rc_pkt_epoch_time
Definition: tcp_bbr.h:615
uint16_t rc_startup_pg
Definition: tcp_bbr.h:535
uint16_t bbr_utter_max
Definition: tcp_bbr.h:710
uint32_t rc_bbr_cwnd_gain
Definition: tcp_bbr.h:640
uint32_t rc_lt_time
Definition: tcp_bbr.h:631
uint32_t rc_min_rto_ms
Definition: tcp_bbr.h:670
uint32_t rc_saved_cwnd
Definition: tcp_bbr.h:643
uint32_t rc_initial_hptsi_bw
Definition: tcp_bbr.h:654
uint32_t gain_epoch
Definition: tcp_bbr.h:669
int32_t bbr_hptsi_segments_max
Definition: tcp_bbr.h:678
uint32_t rc_rtt_shrinks
Definition: tcp_bbr.h:544
uint32_t rc_pace_max_segs
Definition: tcp_bbr.h:541
uint32_t cur_rtt
Definition: tcp_bbr.h:537
uint64_t rc_bbr_cur_del_rate
Definition: tcp_bbr.h:601
uint32_t r_app_limited_until
Definition: tcp_bbr.h:545
uint32_t rc_lost_at_pktepoch
Definition: tcp_bbr.h:553
uint32_t rc_last_rtt
Definition: tcp_bbr.h:577
uint32_t bbr_hdwr_cnt_noset_snt
Definition: tcp_bbr.h:689
uint32_t rc_lost
Definition: tcp_bbr.h:646
uint32_t rc_inc_tcp_oh
Definition: tcp_bbr.h:591
uint16_t rc_pkt_delay
Definition: tcp_bbr.h:559
uint32_t rc_num_maps_alloced
Definition: tcp_bbr.h:703
uint32_t rc_num_split_allocs
Definition: tcp_bbr.h:704
uint32_t last_inbound_ts
Definition: tcp_bbr.h:589
uint32_t lowest_rtt
Definition: tcp_bbr.h:620
uint32_t rc_tlp_rxt_last_time
Definition: tcp_bbr.h:687
uint32_t restrict_growth
Definition: tcp_bbr.h:595
uint32_t rc_lost_bytes
Definition: tcp_bbr.h:519
uint64_t red_bw
Definition: tcp_bbr.h:664
uint32_t rc_delivered
Definition: tcp_bbr.h:515
uint32_t rc_red_cwnd_pe
Definition: tcp_bbr.h:662
uint32_t rc_target_at_state
Definition: tcp_bbr.h:531
uint32_t rc_agg_early
Definition: tcp_bbr.h:609
uint32_t last_in_probertt
Definition: tcp_bbr.h:695
struct time_filter rc_delrate
Definition: tcp_bbr.h:523
uint32_t startup_last_srtt
Definition: tcp_bbr.h:690
uint32_t rc_bbr_enters_probertt
Definition: tcp_bbr.h:629
uint32_t rc_recovery_start
Definition: tcp_bbr.h:598
uint32_t rc_bbr_last_startup_epoch
Definition: tcp_bbr.h:627
uint32_t rc_rcvtime
Definition: tcp_bbr.h:611
uint32_t rc_high_rwnd
Definition: tcp_bbr.h:574
uint32_t non_gain_extra
Definition: tcp_bbr.h:693
uint64_t rc_lt_bw
Definition: tcp_bbr.h:636
uint32_t bbr_smallest_srtt_this_state
Definition: tcp_bbr.h:621
uint32_t rc_last_delay_val
Definition: tcp_bbr.h:511
int32_t bbr_hptsi_segments_delay_tar
Definition: tcp_bbr.h:676
uint32_t rc_went_idle_time
Definition: tcp_bbr.h:539
uint32_t rc_lt_epoch_use
Definition: tcp_bbr.h:596
struct sack_filter bbr_sf
Definition: tcp_bbr.h:583
uint32_t rc_probertt_int
Definition: tcp_bbr.h:666
uint32_t highest_hdwr_delay
Definition: tcp_bbr.h:692
uint32_t rc_reorder_fade
Definition: tcp_bbr.h:672
uint32_t rc_min_to
Definition: tcp_bbr.h:653
uint32_t rc_rcv_epoch_start
Definition: tcp_bbr.h:547
uint32_t substate_pe
Definition: tcp_bbr.h:644
struct bbr_sendmap * rc_tlp_send
Definition: tcp_bbr.h:528
uint32_t rc_bbr_state_time
Definition: tcp_bbr.h:651
uint32_t rc_pkt_epoch_rtt
Definition: tcp_bbr.h:617
uint32_t rc_incr_tmrs
Definition: tcp_bbr.h:594
uint32_t rc_bbr_hptsi_gain
Definition: tcp_bbr.h:512
uint32_t bbr_lost_at_state
Definition: tcp_bbr.h:656
uint32_t rc_cwnd_on_ent
Definition: tcp_bbr.h:607
uint32_t rc_lowest_rtt
Definition: tcp_bbr.h:575
uint32_t rc_inc_enet_oh
Definition: tcp_bbr.h:593
uint32_t bbr_ts_check_our_cts
Definition: tcp_bbr.h:686
uint32_t r_measurement_count
Definition: tcp_bbr.h:555
struct bbr_sendmap * rc_next
Definition: tcp_bbr.h:563
uint32_t rc_bbr_state_atflight
Definition: tcp_bbr.h:626
uint32_t cur_rtt_send_time
Definition: tcp_bbr.h:683
uint32_t bbr_rttprobe_gain_val
Definition: tcp_bbr.h:679
uint32_t rc_ack_hdwr_delay
Definition: tcp_bbr.h:691
struct bbr_sendmap * rc_sacklast
Definition: tcp_bbr.h:561
uint32_t bbr_peer_tsratio
Definition: tcp_bbr.h:684
uint16_t rc_drain_pg
Definition: tcp_bbr.h:702
uint32_t rc_hptsi_agg_delay
Definition: tcp_bbr.h:516
uint32_t flightsize_at_drain
Definition: tcp_bbr.h:696
uint32_t rc_pace_min_segs
Definition: tcp_bbr.h:542
uint32_t rc_sacked
Definition: tcp_bbr.h:566
uint16_t rc_free_cnt
Definition: tcp_bbr.h:533
uint32_t bbr_ts_check_tstmp
Definition: tcp_bbr.h:685
struct bbr_sendmap * rc_resend
Definition: tcp_bbr.h:509
uint32_t rc_lt_del
Definition: tcp_bbr.h:599
uint32_t rc_holes_rxt
Definition: tcp_bbr.h:567
uint32_t bbr_smallest_srtt_state2
Definition: tcp_bbr.h:688
struct time_filter_small rc_rttprop
Definition: tcp_bbr.h:588
uint32_t rc_inc_ip_oh
Definition: tcp_bbr.h:592
uint32_t rc_hpts_flags
Definition: tcp_bbr.h:513
uint16_t rc_reorder_shift
Definition: tcp_bbr.h:558
struct bbr_head rc_free
Definition: tcp_bbr.h:527
uint16_t bbr_google_discount
Definition: tcp_bbr.h:711
int32_t bbr_hptsi_per_second
Definition: tcp_bbr.h:675
uint32_t rc_lost_at_startup
Definition: tcp_bbr.h:624
uint32_t ts_in
Definition: tcp_bbr.h:698
struct bbr_head rc_tmap
Definition: tcp_bbr.h:508
uint16_t bbr_hptsi_segments_floor
Definition: tcp_bbr.h:709
uint32_t rc_pkt_epoch_loss_rate
Definition: tcp_bbr.h:641
uint32_t rc_pkt_epoch_del
Definition: tcp_bbr.h:612
uint32_t rc_level_state_extra
Definition: tcp_bbr.h:661
uint32_t bbr_cross_over
Definition: tcp_bbr.h:578
uint32_t rc_timer_exp
Definition: tcp_bbr.h:546
uint32_t rc_reorder_ts
Definition: tcp_bbr.h:569
struct bbr_head rc_map
Definition: tcp_bbr.h:507
uint32_t rc_pkt_epoch
Definition: tcp_bbr.h:614
uint32_t rc_probertt_srttchktim
Definition: tcp_bbr.h:667
uint16_t rc_tlp_seg_send_cnt
Definition: tcp_bbr.h:700
uint32_t rc_pe_of_prtt
Definition: tcp_bbr.h:697
uint32_t recovery_lr
Definition: tcp_bbr.h:694
uint32_t bbr_log_max
Definition: tcp_bbr.h:260
uint32_t bbr_log_at
Definition: tcp_bbr.h:259
struct bbr_log entries[0]
Definition: tcp_bbr.h:261
uint32_t delivered
Definition: tcp_bbr.h:230
uint64_t rttProp
Definition: tcp_bbr.h:233
struct bbr_sendmap * rsm
Definition: tcp_bbr.h:213
uint32_t blk_end[4]
Definition: tcp_bbr.h:248
uint8_t n_sackblks
Definition: tcp_bbr.h:251
uint32_t t_flags
Definition: tcp_bbr.h:217
uint8_t applied
Definition: tcp_bbr.h:252
uint32_t snd_una
Definition: tcp_bbr.h:220
uint32_t exp_del
Definition: tcp_bbr.h:239
uint32_t cwnd_gain
Definition: tcp_bbr.h:243
uint64_t cur_del_rate
Definition: tcp_bbr.h:231
uint8_t __spare
Definition: tcp_bbr.h:254
uint32_t th_ack
Definition: tcp_bbr.h:219
uint32_t delayed_by
Definition: tcp_bbr.h:238
uint32_t hptsi_gain
Definition: tcp_bbr.h:242
uint32_t th_seq
Definition: tcp_bbr.h:218
uint32_t epoch
Definition: tcp_bbr.h:244
uint32_t len
Definition: tcp_bbr.h:249
uint32_t blk_start[4]
Definition: tcp_bbr.h:247
uint8_t inhpts
Definition: tcp_bbr.h:253
uint32_t applimited
Definition: tcp_bbr.h:228
uint64_t lt_bw
Definition: tcp_bbr.h:234
uint32_t snd_nxt
Definition: tcp_bbr.h:221
struct tcpcb * tp
Definition: tcp_bbr.h:216
uint32_t snd_wnd
Definition: tcp_bbr.h:224
uint32_t slot
Definition: tcp_bbr.h:237
uint64_t delRate
Definition: tcp_bbr.h:232
uint32_t new_win
Definition: tcp_bbr.h:241
uint8_t use_lt_bw
Definition: tcp_bbr.h:255
uint32_t timeStamp
Definition: tcp_bbr.h:235
uint8_t type
Definition: tcp_bbr.h:250
uint32_t lt_epoch
Definition: tcp_bbr.h:245
uint32_t pkts_out
Definition: tcp_bbr.h:240
uint32_t snd_max
Definition: tcp_bbr.h:222
uint32_t snd_cwnd
Definition: tcp_bbr.h:223
uint32_t rc_lost
Definition: tcp_bbr.h:225
uint32_t time
Definition: tcp_bbr.h:236
uint32_t inflight
Definition: tcp_bbr.h:227
uint32_t target_cwnd
Definition: tcp_bbr.h:226
uint64_t sb_acc
Definition: tcp_bbr.h:214
uint64_t tcp_data_ac
Definition: tcp_bbr.h:477
uint64_t tcp_bbr_lowgain_half
Definition: tcp_bbr.h:448
uint64_t tcp_bbr_topaceout
Definition: tcp_bbr.h:472
uint64_t tcp_iwnd_tso
Definition: tcp_bbr.h:462
uint64_t tcp_bbr_algorithm
Definition: tcp_bbr.h:468
uint64_t tcp_rack_pace_max_seg
Definition: tcp_bbr.h:453
uint64_t tcp_bbr_lowgain_fd
Definition: tcp_bbr.h:449
uint64_t tcp_extra_state
Definition: tcp_bbr.h:465
uint64_t tcp_rack_reord_fade
Definition: tcp_bbr.h:456
uint64_t tcp_bbr_rec_over_hpts
Definition: tcp_bbr.h:438
uint64_t tcp_bbr_max_rto
Definition: tcp_bbr.h:452
uint64_t tcp_bbr_drain_inc_extra
Definition: tcp_bbr.h:435
uint64_t tcp_bbr_probertt_gain
Definition: tcp_bbr.h:471
uint64_t tcp_bbr_pace_seg_min
Definition: tcp_bbr.h:433
uint64_t tcp_bbr_lowgain_thresh
Definition: tcp_bbr.h:447
uint64_t tcp_use_rackcheat
Definition: tcp_bbr.h:473
uint64_t tcp_bbr_pace_seg_max
Definition: tcp_bbr.h:432
uint64_t tcp_rack_pkt_delay
Definition: tcp_bbr.h:458
uint64_t tcp_delack
Definition: tcp_bbr.h:474
uint64_t tcp_retran_wtso
Definition: tcp_bbr.h:476
uint64_t tcp_bbr_probertt_len
Definition: tcp_bbr.h:470
uint64_t tcp_ts_raises
Definition: tcp_bbr.h:478
uint64_t tcp_bbr_usedel_rate
Definition: tcp_bbr.h:450
uint64_t tcp_bbr_rwnd_is_app
Definition: tcp_bbr.h:442
uint64_t tcp_bbr_tslimits
Definition: tcp_bbr.h:469
uint64_t tcp_bbr_one_retran
Definition: tcp_bbr.h:444
uint64_t tcp_policer_det
Definition: tcp_bbr.h:481
uint64_t tcp_bbr_startup_loss_exit
Definition: tcp_bbr.h:445
uint64_t tcp_bbr_use_lowgain
Definition: tcp_bbr.h:446
uint64_t tcp_bbr_pace_del_tar
Definition: tcp_bbr.h:431
uint64_t tcp_bbr_min_rto
Definition: tcp_bbr.h:451
uint64_t tcp_bbr_probe_rtt_int
Definition: tcp_bbr.h:443
uint64_t tcp_bbr_drain_pg
Definition: tcp_bbr.h:441
uint64_t tcp_bbr_pace_per_sec
Definition: tcp_bbr.h:430
uint64_t tcp_floor_min_tso
Definition: tcp_bbr.h:466
uint64_t tcp_rack_tlp_thresh
Definition: tcp_bbr.h:457
uint64_t tcp_utter_max_tso
Definition: tcp_bbr.h:463
uint64_t tcp_bbr_recforce
Definition: tcp_bbr.h:439
uint64_t tcp_pacing_oh_tmr
Definition: tcp_bbr.h:479
uint64_t tcp_bbr_iwintso
Definition: tcp_bbr.h:437
uint64_t tcp_hdwr_pacing
Definition: tcp_bbr.h:464
uint64_t tcp_bbr_pace_cross
Definition: tcp_bbr.h:434
uint64_t tcp_rack_cheat
Definition: tcp_bbr.h:461
uint64_t tcp_bbr_unlimited
Definition: tcp_bbr.h:436
uint64_t tcp_pacing_oh
Definition: tcp_bbr.h:480
uint64_t tcp_rack_reord_thresh
Definition: tcp_bbr.h:455
uint64_t tcp_maxpeak
Definition: tcp_bbr.h:475
uint64_t tcp_bbr_startup_pg
Definition: tcp_bbr.h:440
uint64_t tcp_rack_min_to
Definition: tcp_bbr.h:454
uint64_t tcp_bbr_startup_exit_epoch
Definition: tcp_bbr.h:459
uint64_t tcp_bbr_ack_comp_alg
Definition: tcp_bbr.h:460
uint32_t rs_rtt_highest
Definition: tcp_bbr.h:169
uint64_t rs_rtt_tot
Definition: tcp_bbr.h:172
uint32_t cur_rtt
Definition: tcp_bbr.h:173
uint32_t rs_rtt_low_seq_start
Definition: tcp_bbr.h:167
uint64_t rs_cDR
Definition: tcp_bbr.h:179
uint32_t rc_crtt_set
Definition: tcp_bbr.h:177
uint32_t rs_rtt_lowest_sendtime
Definition: tcp_bbr.h:166
uint32_t cur_rtt_rsmcnt
Definition: tcp_bbr.h:176
uint32_t rs_rtt_lowest
Definition: tcp_bbr.h:165
uint32_t rs_rtt_cnt
Definition: tcp_bbr.h:170
uint32_t cur_rtt_bytecnt
Definition: tcp_bbr.h:174
uint32_t avail_bits
Definition: tcp_bbr.h:178
uint32_t rs_flags
Definition: tcp_bbr.h:164
uint32_t r_first_sent_time
Definition: tcp_bbr.h:91
uint8_t r_rtt_not_allowed
Definition: tcp_bbr.h:70
uint16_t r_spare16
Definition: tcp_bbr.h:82
uint32_t r_start
Definition: tcp_bbr.h:61
uint32_t r_delivered
Definition: tcp_bbr.h:65
uint8_t r_is_smallmap
Definition: tcp_bbr.h:76
uint8_t r_is_drain
Definition: tcp_bbr.h:71
uint8_t r_in_tmap
Definition: tcp_bbr.h:75
uint32_t r_pacing_delay
Definition: tcp_bbr.h:92
uint32_t r_tim_lastsent[BBR_NUM_OF_RETRANS]
Definition: tcp_bbr.h:85
uint8_t r_is_gain
Definition: tcp_bbr.h:77
uint32_t r_flight_at_send
Definition: tcp_bbr.h:93
uint32_t r_del_time
Definition: tcp_bbr.h:67
uint8_t r_limit_type
Definition: tcp_bbr.h:79
uint8_t r_dupack
Definition: tcp_bbr.h:74
uint32_t r_rtr_bytes
Definition: tcp_bbr.h:64
uint32_t r_end
Definition: tcp_bbr.h:62
uint8_t r_rtr_cnt
Definition: tcp_bbr.h:68
uint8_t r_ts_valid
Definition: tcp_bbr.h:73
uint16_t r_flags
Definition: tcp_bbr.h:81
uint32_t r_del_ack_ts
Definition: tcp_bbr.h:83
uint8_t r_app_limited
Definition: tcp_bbr.h:72
uint8_t r_bbr_state
Definition: tcp_bbr.h:78
TAILQ_ENTRY(bbr_sendmap) r_next
uint64_t bbr_to_arm_rack
Definition: tcp_bbr.h:368
uint64_t bbr_hdwr_rl_mod_fail
Definition: tcp_bbr.h:417
uint64_t bbr_tlp_set
Definition: tcp_bbr.h:370
uint64_t bbr_to_alloc
Definition: tcp_bbr.h:381
uint64_t bbr_miss_tso_app
Definition: tcp_bbr.h:410
uint64_t bbr_miss_tso_cwnd
Definition: tcp_bbr.h:409
uint64_t bbr_alloc_limited
Definition: tcp_bbr.h:419
uint64_t bbr_miss_unknown
Definition: tcp_bbr.h:413
uint64_t bbr_split_limited
Definition: tcp_bbr.h:421
uint64_t bbr_saw_emsgsiz
Definition: tcp_bbr.h:361
uint64_t bbr_to_alloc_failed
Definition: tcp_bbr.h:376
uint64_t bbr_sack_proc_short
Definition: tcp_bbr.h:379
uint64_t bbr_sack_passed
Definition: tcp_bbr.h:384
uint64_t bbr_tlp_retran_fail
Definition: tcp_bbr.h:366
uint64_t bbr_hpts_min_time
Definition: tcp_bbr.h:406
uint64_t bbr_paced_segments
Definition: tcp_bbr.h:374
uint64_t bbr_acks_with_sacks
Definition: tcp_bbr.h:395
uint64_t bbr_rlock_left_ret0
Definition: tcp_bbr.h:385
uint64_t bbr_dropped_af_data
Definition: tcp_bbr.h:400
uint64_t bbr_plain_acks
Definition: tcp_bbr.h:394
uint64_t bbr_collapsed_win
Definition: tcp_bbr.h:418
uint64_t bbr_sack_blocks
Definition: tcp_bbr.h:389
uint64_t bbr_sack_proc_all
Definition: tcp_bbr.h:378
uint64_t bbr_progress_drops
Definition: tcp_bbr.h:396
uint64_t bbr_alloc_limited_conns
Definition: tcp_bbr.h:420
uint64_t bbr_app_limited
Definition: tcp_bbr.h:404
uint64_t bbr_rlock_left_ret1
Definition: tcp_bbr.h:386
uint64_t bbr_sack_search_back
Definition: tcp_bbr.h:393
uint64_t bbr_sack_search_fwd
Definition: tcp_bbr.h:392
uint64_t bbr_badfr
Definition: tcp_bbr.h:358
uint64_t bbr_offset_drop
Definition: tcp_bbr.h:382
uint64_t bbr_early
Definition: tcp_bbr.h:397
uint64_t bbr_persist_reneg
Definition: tcp_bbr.h:399
uint64_t bbr_offset_recovery
Definition: tcp_bbr.h:365
uint64_t bbr_sack_search_both
Definition: tcp_bbr.h:391
uint64_t bbr_reorder_seen
Definition: tcp_bbr.h:362
uint64_t bbr_reneges_seen
Definition: tcp_bbr.h:398
uint64_t bbr_force_timer_start
Definition: tcp_bbr.h:405
uint64_t bbr_badfr_bytes
Definition: tcp_bbr.h:359
uint64_t bbr_tlp_tot
Definition: tcp_bbr.h:363
uint64_t bbr_rwnd_limited
Definition: tcp_bbr.h:403
uint64_t bbr_runt_sacks
Definition: tcp_bbr.h:383
uint64_t bbr_meets_tso_thresh
Definition: tcp_bbr.h:407
uint64_t bbr_to_arm_tlp
Definition: tcp_bbr.h:373
uint64_t bbr_saw_oerr
Definition: tcp_bbr.h:360
uint64_t bbr_resends_set
Definition: tcp_bbr.h:371
uint64_t bbr_failed_mbuf_aloc
Definition: tcp_bbr.h:401
uint64_t bbr_miss_retran
Definition: tcp_bbr.h:411
uint64_t bbr_hdwr_rl_add_fail
Definition: tcp_bbr.h:415
uint64_t bbr_hdwr_rl_mod_ok
Definition: tcp_bbr.h:416
uint64_t bbr_force_output
Definition: tcp_bbr.h:372
uint64_t bbr_miss_tso_rwnd
Definition: tcp_bbr.h:408
uint64_t bbr_cwnd_limited
Definition: tcp_bbr.h:402
uint64_t bbr_static_rwnd
Definition: tcp_bbr.h:388
uint64_t bbr_miss_tlp
Definition: tcp_bbr.h:412
uint64_t bbr_sack_blocks_skip
Definition: tcp_bbr.h:390
uint64_t bbr_hdwr_rl_add_ok
Definition: tcp_bbr.h:414
uint64_t bbr_enter_probertt
Definition: tcp_bbr.h:369
uint64_t bbr_to_alloc_emerg
Definition: tcp_bbr.h:377
uint64_t bbr_dynamic_rwnd
Definition: tcp_bbr.h:387
uint64_t bbr_tlp_newdata
Definition: tcp_bbr.h:364
uint64_t bbr_saw_enobuf
Definition: tcp_bbr.h:375
uint64_t bbr_to_tot
Definition: tcp_bbr.h:367
uint64_t bbr_sack_proc_restart
Definition: tcp_bbr.h:380
Definition: in_pcb.h:217
uint16_t hw_pacing_set
Definition: tcp_bbr.h:731
uint8_t rc_use_ts_limit
Definition: tcp_bbr.h:785
uint8_t xxx_bbr_hdw_pace_idx
Definition: tcp_bbr.h:745
uint16_t ts_can_raise
Definition: tcp_bbr.h:726
uint8_t rc_allow_data_af_clo
Definition: tcp_bbr.h:771
int32_t(* r_substate)(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, struct tcpopt *, int32_t, int32_t, uint32_t, int32_t, int32_t, uint8_t)
Definition: tcp_bbr.h:718
uint16_t rc_filled_pipe
Definition: tcp_bbr.h:755
uint8_t bbr_prev_in_rec
Definition: tcp_bbr.h:742
uint8_t rc_max_rto_sec
Definition: tcp_bbr.h:781
uint16_t rc_resends_use_tso
Definition: tcp_bbr.h:750
uint8_t rc_tlp_rtx_out
Definition: tcp_bbr.h:772
uint8_t rc_tlp_in_progress
Definition: tcp_bbr.h:773
uint8_t bbr_hdrw_pacing
Definition: tcp_bbr.h:740
uint8_t bbr_use_rack_cheat
Definition: tcp_bbr.h:737
uint8_t rc_ts_clock_set
Definition: tcp_bbr.h:787
uint8_t rc_no_pacing
Definition: tcp_bbr.h:790
struct inpcb * rc_inp
Definition: tcp_bbr.h:722
uint16_t output_error_seen
Definition: tcp_bbr.h:729
uint8_t r_init_rtt
Definition: tcp_bbr.h:765
struct bbr_control r_ctl
Definition: tcp_bbr.h:794
uint8_t rc_last_options
Definition: tcp_bbr.h:779
uint8_t r_state
Definition: tcp_bbr.h:763
uint16_t gain_is_limited
Definition: tcp_bbr.h:728
uint8_t r_use_policer
Definition: tcp_bbr.h:766
uint8_t rc_ts_data_set
Definition: tcp_bbr.h:786
uint16_t rc_output_starts_timer
Definition: tcp_bbr.h:749
uint8_t rc_in_persist
Definition: tcp_bbr.h:769
uint16_t rc_loss_exit
Definition: tcp_bbr.h:752
uint16_t r_wanted_output
Definition: tcp_bbr.h:746
uint8_t r_is_v6
Definition: tcp_bbr.h:777
uint8_t rc_init_win
Definition: tcp_bbr.h:792
uint16_t no_pacing_until
Definition: tcp_bbr.h:725
uint16_t rc_all_timers_stopped
Definition: tcp_bbr.h:751
struct tcpcb * rc_tp
Definition: tcp_bbr.h:721
uint8_t rc_lt_use_bw
Definition: tcp_bbr.h:770
uint16_t rc_tlp_new_data
Definition: tcp_bbr.h:756
uint16_t rc_lt_is_sampling
Definition: tcp_bbr.h:754
uint16_t rc_ack_was_delayed
Definition: tcp_bbr.h:753
uint8_t r_agg_early_set
Definition: tcp_bbr.h:764
uint32_t rc_pacer_started
Definition: tcp_bbr.h:724
uint16_t rc_hit_state_1
Definition: tcp_bbr.h:757
uint8_t r_timer_override
Definition: tcp_bbr.h:768
uint16_t bbr_segs_rcvd
Definition: tcp_bbr.h:734
uint8_t bbr_timer_src
Definition: tcp_bbr.h:736
uint8_t bbr_init_win_cheat
Definition: tcp_bbr.h:738
uint8_t rc_past_init_win
Definition: tcp_bbr.h:778
uint8_t rc_use_google
Definition: tcp_bbr.h:784
uint16_t xxx_r_ack_count
Definition: tcp_bbr.h:732
uint8_t rc_tlp_threshold
Definition: tcp_bbr.h:780
uint8_t rc_use_idle_restart
Definition: tcp_bbr.h:774
uint8_t bbr_hdw_pace_ena
Definition: tcp_bbr.h:741
uint8_t rc_ack_is_cumack
Definition: tcp_bbr.h:789
uint16_t oerror_cnt
Definition: tcp_bbr.h:730
uint8_t use_policer_detection
Definition: tcp_bbr.h:744
uint8_t rc_cwnd_limited
Definition: tcp_bbr.h:782
uint8_t rc_bbr_substate
Definition: tcp_bbr.h:776
uint8_t rc_tmr_stopped
Definition: tcp_bbr.h:783
uint16_t skip_gain
Definition: tcp_bbr.h:727
uint8_t alloc_limit_reported
Definition: tcp_bbr.h:791
uint8_t rc_bbr_state
Definition: tcp_bbr.h:775
uint16_t rc_is_pkt_epoch_now
Definition: tcp_bbr.h:760
struct timeval rc_tv
Definition: tcp_bbr.h:723
uint16_t rc_prtt_set_ts
Definition: tcp_bbr.h:759
uint8_t r_recovery_bw
Definition: tcp_bbr.h:767
uint16_t rc_has_collapsed
Definition: tcp_bbr.h:761
uint16_t rc_timer_first
Definition: tcp_bbr.h:748
uint8_t rc_ts_cant_be_used
Definition: tcp_bbr.h:788
uint16_t rtt_valid
Definition: tcp_bbr.h:747
uint8_t bbr_attempt_hdwr_pace
Definition: tcp_bbr.h:739
uint16_t rc_ts_valid
Definition: tcp_bbr.h:758
uint8_t pkt_conservation
Definition: tcp_bbr.h:743
Definition: tcp_var.h:132
counter_u64_t bbr_stat_arry[BBR_STAT_SIZE]
Definition: bbr.c:429
#define BBR_OPTS_SIZE
Definition: tcp_bbr.h:489
TAILQ_HEAD(bbr_head, bbr_sendmap)
counter_u64_t bbr_opts_arry[BBR_OPTS_SIZE]
Definition: bbr.c:430
#define BBR_NUM_OF_RETRANS
Definition: tcp_bbr.h:44
#define BBR_STAT_SIZE
Definition: tcp_bbr.h:485
struct bbr_rtt_sample __aligned