FreeBSD kernel IPv4 code
tcp_bbr.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bbr_sendmap
 
struct  bbr_rtt_sample
 
struct  bbr_log
 
struct  bbr_log_sysctl_out
 
struct  bbr_stats
 
struct  bbr_opts_stats
 
struct  bbr_control
 
struct  tcp_bbr
 

Macros

#define BBR_INITIAL_RTO   1000000 /* 1 second in micro-seconds */
 
#define BBR_ACKED   0x0001 /* The remote endpoint acked this */
 
#define BBR_WAS_RENEGED   0x0002 /* The peer reneged the ack */
 
#define BBR_RXT_CLEARED   0x0004 /* ACK Cleared by the RXT timer */
 
#define BBR_OVERMAX
 
#define BBR_SACK_PASSED   0x0010 /* A sack was done above this block */
 
#define BBR_WAS_SACKPASS   0x0020 /* We retransmitted due to SACK pass */
 
#define BBR_HAS_FIN   0x0040 /* segment is sent with fin */
 
#define BBR_TLP   0x0080 /* segment sent as tail-loss-probe */
 
#define BBR_HAS_SYN   0x0100 /* segment has the syn */
 
#define BBR_MARKED_LOST
 
#define BBR_RWND_COLLAPSED   0x0400 /* The peer collapsed the rwnd on the segment */
 
#define BBR_NUM_OF_RETRANS   7
 
#define BBR_INCL_ENET_OH   0x01
 
#define BBR_INCL_IP_OH   0x02
 
#define BBR_INCL_TCP_OH   0x03
 
#define BBR_LIMIT_TYPE_SPLIT   1
 
#define BBR_SEGMENT_TIME_SIZE   1500 /* How many bytes in time_between */
 
#define BBR_MIN_SEG   1460 /* MSS size */
 
#define BBR_MAX_GAIN_VALUE   0xffff
 
#define BBR_TIMER_FUDGE   1500 /* 1.5ms in micro seconds */
 
#define BBR_RED_BW_CONGSIG   0 /* We enter recovery and set using b/w */
 
#define BBR_RED_BW_RATECAL   1 /* We are calculating the loss rate */
 
#define BBR_RED_BW_USELRBW
 
#define BBR_RED_BW_SETHIGHLOSS
 
#define BBR_RED_BW_PE_CLREARLY
 
#define BBR_RED_BW_PE_CLAFDEL
 
#define BBR_RED_BW_REC_ENDCLL
 
#define BBR_RED_BW_PE_NOEARLY_OUT
 
#define BBR_CALC_BW   1
 
#define BBR_CALC_LOSS   2
 
#define BBR_RTT_BY_TIMESTAMP   0
 
#define BBR_RTT_BY_EXACTMATCH   1
 
#define BBR_RTT_BY_EARLIER_RET   2
 
#define BBR_RTT_BY_THIS_RETRAN   3
 
#define BBR_RTT_BY_SOME_RETRAN   4
 
#define BBR_RTT_BY_TSMATCHING   5
 
#define BBR_PERSISTS_FROM_1   1
 
#define BBR_PERSISTS_FROM_2   2
 
#define BBR_PERSISTS_FROM_3   3
 
#define BBR_PERSISTS_FROM_4   4
 
#define BBR_PERSISTS_FROM_5   5
 
#define BBR_RTT_PROP   0
 
#define BBR_RTT_RACK   1
 
#define BBR_RTT_PKTRTT   2
 
#define BBR_SRTT   3
 
#define BBR_SACKED   0
 
#define BBR_CUM_ACKED   1
 
#define BBR_HIGH_SPEED   1000
 
#define BBR_HIGHSPEED_NUM_MSS   12
 
#define MAX_REDUCE_RXT
 
#define BBR_RS_RTT_EMPTY   0x00000001 /* Nothing yet stored in RTT's */
 
#define BBR_RS_BW_EMPTY   0x00000002 /* Nothing yet stored in cDR */
 
#define BBR_RS_RTT_VALID   0x00000004 /* We have at least one valid RTT */
 
#define BBR_RS_BW_VAILD   0x00000008 /* We have a valid cDR */
 
#define BBR_RS_EMPTY   (BBR_RS_RTT_EMPTY|BBR_RS_BW_EMPTY)
 
#define BBR_RTTS_INIT   0
 
#define BBR_RTTS_NEWRTT   1
 
#define BBR_RTTS_RTTPROBE   2
 
#define BBR_RTTS_WASIDLE   3
 
#define BBR_RTTS_PERSIST   4
 
#define BBR_RTTS_REACHTAR   5
 
#define BBR_RTTS_ENTERPROBE   6
 
#define BBR_RTTS_SHRINK_PG   7
 
#define BBR_RTTS_SHRINK_PG_FINAL   8
 
#define BBR_RTTS_NEW_TARGET   9
 
#define BBR_RTTS_LEAVE_DRAIN   10
 
#define BBR_RTTS_RESETS_VALUES   11
 
#define BBR_NUM_RATES   5
 
#define BBR_RT_FLAG_FREE   0x00 /* Is on the free list */
 
#define BBR_RT_FLAG_INUSE   0x01 /* Has been allocated */
 
#define BBR_RT_FLAG_READY   0x02 /* Ready to initiate a measurement. */
 
#define BBR_RT_FLAG_CAPPED_PRE   0x04 /* Ready to cap if we send the next segment */
 
#define BBR_RT_FLAG_CAPPED   0x08 /* Measurement is capped */
 
#define BBR_RT_FLAG_PASTFA   0x10 /* Past the first ack. */
 
#define BBR_RT_FLAG_LIMITED   0x20 /* Saw application/cwnd or rwnd limited period */
 
#define BBR_RT_SEEN_A_ACK   0x40 /* A ack has been saved */
 
#define BBR_RT_PREV_RTT_SET   0x80 /* There was a RTT set in */
 
#define BBR_RT_PREV_SEND_TIME
 
#define BBR_RT_SET_GRADIENT   0x200
 
#define BBR_RT_TS_VALID   0x400
 
#define BBR_TO_FRM_TMR   1
 
#define BBR_TO_FRM_TLP   2
 
#define BBR_TO_FRM_RACK   3
 
#define BBR_TO_FRM_KEEP   4
 
#define BBR_TO_FRM_PERSIST   5
 
#define BBR_TO_FRM_DELACK   6
 
#define BBR_SEES_STRETCH_ACK   1
 
#define BBR_SEES_COMPRESSED_ACKS   2
 
#define TT_BBR_FR_TMR   0x2001
 
#define BBR_SCALE   8
 
#define BBR_UNIT   (1 << BBR_SCALE)
 
#define BBR_NUM_RTTS_FOR_DEL_LIMIT
 
#define BBR_NUM_RTTS_FOR_GOOG_DEL_LIMIT
 
#define BBR_SECONDS_NO_RTT   10 /* 10 seconds with no RTT shrinkage */
 
#define BBR_PROBERTT_MAX   200 /* 200ms */
 
#define BBR_PROBERTT_NUM_MSS   4
 
#define BBR_STARTUP_EPOCHS   3
 
#define USECS_IN_MSEC   1000
 
#define BBR_TIME_TO_SECONDS(a)   (a / USECS_IN_SECOND)
 
#define BBR_TIME_TO_MILLI(a)   (a / MS_IN_USEC)
 
#define BBR_TS_TO_MS(t)   ((t+999)/MS_IN_USEC)
 
#define BBR_STATE_STARTUP   0x01
 
#define BBR_STATE_DRAIN   0x02
 
#define BBR_STATE_PROBE_BW   0x03
 
#define BBR_STATE_PROBE_RTT   0x04
 
#define BBR_STATE_IDLE_EXIT   0x05
 
#define BBR_SUB_GAIN   0 /* State 0 where we are 5/4 BBR_UNIT */
 
#define BBR_SUB_DRAIN   1 /* State 1 where we are at 3/4 BBR_UNIT */
 
#define BBR_SUB_LEVEL1   2 /* State 1 first BBR_UNIT */
 
#define BBR_SUB_LEVEL2   3 /* State 2nd BBR_UNIT */
 
#define BBR_SUB_LEVEL3   4 /* State 3rd BBR_UNIT */
 
#define BBR_SUB_LEVEL4   5 /* State 4th BBR_UNIT */
 
#define BBR_SUB_LEVEL5   6 /* State 5th BBR_UNIT */
 
#define BBR_SUB_LEVEL6   7 /* State last BBR_UNIT */
 
#define BBR_SUBSTATE_COUNT   8
 
#define BBR_REDUCE_AT_FR   5
 
#define BBR_BIG_LOG_SIZE   300000
 
#define BBR_STAT_SIZE   (sizeof(struct bbr_stats)/sizeof(uint64_t))
 
#define BBR_STAT_ADD(name, amm)   counter_u64_add(bbr_stat_arry[(offsetof(struct bbr_stats, name)/sizeof(uint64_t))], (amm))
 
#define BBR_STAT_INC(name)   BBR_STAT_ADD(name, 1)
 
#define BBR_OPTS_SIZE   (sizeof(struct bbr_stats)/sizeof(uint64_t))
 
#define BBR_OPTS_ADD(name, amm)   counter_u64_add(bbr_opts_arry[(offsetof(struct bbr_opts_stats, name)/sizeof(uint64_t))], (amm))
 
#define BBR_OPTS_INC(name)   BBR_OPTS_ADD(name, 1)
 
#define BBR_NUM_LOSS_RATES   3
 
#define BBR_NUM_BW_RATES   3
 
#define BBR_RECOVERY_LOWRTT   1
 
#define BBR_RECOVERY_MEDRTT   2
 
#define BBR_RECOVERY_HIGHRTT   3
 
#define BBR_RECOVERY_EXTREMERTT   4
 

Functions

struct bbr_sendmap __aligned (CACHE_LINE_SIZE)
 
 TAILQ_ENTRY (bbr_sendmap) r_next
 
 TAILQ_HEAD (bbr_head, bbr_sendmap)
 

Variables

uint32_t r_start
 
uint32_t r_end
 
uint32_t r_rtr_bytes
 
uint32_t r_delivered
 
uint32_t r_del_time
 
uint8_t r_rtr_cnt
 
uint8_t r_rtt_not_allowed
 
uint8_t r_is_drain
 
uint8_t r_app_limited
 
uint8_t r_ts_valid
 
uint8_t r_dupack
 
uint8_t r_in_tmap
 
uint8_t r_is_smallmap
 
uint8_t r_is_gain
 
uint8_t r_bbr_state
 
uint8_t r_limit_type
 
uint16_t r_flags
 
uint16_t r_spare16
 
uint32_t r_del_ack_ts
 
uint32_t r_tim_lastsent [BBR_NUM_OF_RETRANS]
 
uint32_t r_first_sent_time
 
uint32_t r_pacing_delay
 
uint32_t r_flight_at_send
 
struct bbr_rtt_sample __aligned
 
counter_u64_t bbr_stat_arry [BBR_STAT_SIZE]
 
counter_u64_t bbr_opts_arry [BBR_OPTS_SIZE]
 
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)
 
struct tcpcbrc_tp
 
struct inpcbrc_inp
 
struct timeval rc_tv
 
uint32_t rc_pacer_started
 
uint16_t no_pacing_until
 
uint16_t ts_can_raise
 
uint16_t skip_gain
 
uint16_t gain_is_limited
 
uint16_t output_error_seen
 
uint16_t oerror_cnt
 
uint16_t hw_pacing_set
 
uint16_t xxx_r_ack_count
 
uint16_t bbr_segs_rcvd
 
uint8_t bbr_timer_src
 
uint8_t bbr_use_rack_cheat
 
uint8_t bbr_init_win_cheat
 
uint8_t bbr_attempt_hdwr_pace
 
uint8_t bbr_hdrw_pacing
 
uint8_t bbr_hdw_pace_ena
 
uint8_t bbr_prev_in_rec
 
uint8_t pkt_conservation
 
uint8_t use_policer_detection
 
uint8_t xxx_bbr_hdw_pace_idx
 
uint16_t r_wanted_output
 
uint16_t rtt_valid
 
uint16_t rc_timer_first
 
uint16_t rc_output_starts_timer
 
uint16_t rc_resends_use_tso
 
uint16_t rc_all_timers_stopped
 
uint16_t rc_loss_exit
 
uint16_t rc_ack_was_delayed
 
uint16_t rc_lt_is_sampling
 
uint16_t rc_filled_pipe
 
uint16_t rc_tlp_new_data
 
uint16_t rc_hit_state_1
 
uint16_t rc_ts_valid
 
uint16_t rc_prtt_set_ts
 
uint16_t rc_is_pkt_epoch_now
 
uint16_t rc_has_collapsed
 
uint8_t r_state
 
uint8_t r_agg_early_set
 
uint8_t r_init_rtt
 
uint8_t r_use_policer
 
uint8_t r_recovery_bw
 
uint8_t r_timer_override
 
uint8_t rc_in_persist
 
uint8_t rc_lt_use_bw
 
uint8_t rc_allow_data_af_clo
 
uint8_t rc_tlp_rtx_out
 
uint8_t rc_tlp_in_progress
 
uint8_t rc_use_idle_restart
 
uint8_t rc_bbr_state
 
uint8_t rc_bbr_substate
 
uint8_t r_is_v6
 
uint8_t rc_past_init_win
 
uint8_t rc_last_options
 
uint8_t rc_tlp_threshold
 
uint8_t rc_max_rto_sec
 
uint8_t rc_cwnd_limited
 
uint8_t rc_tmr_stopped
 
uint8_t rc_use_google
 
uint8_t rc_use_ts_limit
 
uint8_t rc_ts_data_set
 
uint8_t rc_ts_clock_set
 
uint8_t rc_ts_cant_be_used
 
uint8_t rc_ack_is_cumack
 
uint8_t rc_no_pacing
 
uint8_t alloc_limit_reported
 
uint8_t rc_init_win
 
struct bbr_control r_ctl
 

Macro Definition Documentation

◆ BBR_ACKED

#define BBR_ACKED   0x0001 /* The remote endpoint acked this */

Definition at line 33 of file tcp_bbr.h.

◆ BBR_BIG_LOG_SIZE

#define BBR_BIG_LOG_SIZE   300000

Definition at line 355 of file tcp_bbr.h.

◆ BBR_CALC_BW

#define BBR_CALC_BW   1

Definition at line 120 of file tcp_bbr.h.

◆ BBR_CALC_LOSS

#define BBR_CALC_LOSS   2

Definition at line 121 of file tcp_bbr.h.

◆ BBR_CUM_ACKED

#define BBR_CUM_ACKED   1

Definition at line 144 of file tcp_bbr.h.

◆ BBR_HAS_FIN

#define BBR_HAS_FIN   0x0040 /* segment is sent with fin */

Definition at line 39 of file tcp_bbr.h.

◆ BBR_HAS_SYN

#define BBR_HAS_SYN   0x0100 /* segment has the syn */

Definition at line 41 of file tcp_bbr.h.

◆ BBR_HIGH_SPEED

#define BBR_HIGH_SPEED   1000

Definition at line 147 of file tcp_bbr.h.

◆ BBR_HIGHSPEED_NUM_MSS

#define BBR_HIGHSPEED_NUM_MSS   12

Definition at line 148 of file tcp_bbr.h.

◆ BBR_INCL_ENET_OH

#define BBR_INCL_ENET_OH   0x01

Definition at line 47 of file tcp_bbr.h.

◆ BBR_INCL_IP_OH

#define BBR_INCL_IP_OH   0x02

Definition at line 48 of file tcp_bbr.h.

◆ BBR_INCL_TCP_OH

#define BBR_INCL_TCP_OH   0x03

Definition at line 49 of file tcp_bbr.h.

◆ BBR_INITIAL_RTO

#define BBR_INITIAL_RTO   1000000 /* 1 second in micro-seconds */

Definition at line 31 of file tcp_bbr.h.

◆ BBR_LIMIT_TYPE_SPLIT

#define BBR_LIMIT_TYPE_SPLIT   1

Definition at line 99 of file tcp_bbr.h.

◆ BBR_MARKED_LOST

#define BBR_MARKED_LOST
Value:
0x0200 /*
* This segments is lost and
* totaled into bbr->rc_ctl.rc_lost
*/

Definition at line 42 of file tcp_bbr.h.

◆ BBR_MAX_GAIN_VALUE

#define BBR_MAX_GAIN_VALUE   0xffff

Definition at line 106 of file tcp_bbr.h.

◆ BBR_MIN_SEG

#define BBR_MIN_SEG   1460 /* MSS size */

Definition at line 105 of file tcp_bbr.h.

◆ BBR_NUM_BW_RATES

#define BBR_NUM_BW_RATES   3

Definition at line 496 of file tcp_bbr.h.

◆ BBR_NUM_LOSS_RATES

#define BBR_NUM_LOSS_RATES   3

Definition at line 495 of file tcp_bbr.h.

◆ BBR_NUM_OF_RETRANS

#define BBR_NUM_OF_RETRANS   7

Definition at line 44 of file tcp_bbr.h.

◆ BBR_NUM_RATES

#define BBR_NUM_RATES   5

Definition at line 196 of file tcp_bbr.h.

◆ BBR_NUM_RTTS_FOR_DEL_LIMIT

#define BBR_NUM_RTTS_FOR_DEL_LIMIT
Value:
8 /* How many pkt-rtts do we keep
* Delivery rate for */

Definition at line 315 of file tcp_bbr.h.

◆ BBR_NUM_RTTS_FOR_GOOG_DEL_LIMIT

#define BBR_NUM_RTTS_FOR_GOOG_DEL_LIMIT
Value:
10 /* How many pkt-rtts do we keep
* Delivery rate for google */

Definition at line 316 of file tcp_bbr.h.

◆ BBR_OPTS_ADD

#define BBR_OPTS_ADD (   name,
  amm 
)    counter_u64_add(bbr_opts_arry[(offsetof(struct bbr_opts_stats, name)/sizeof(uint64_t))], (amm))

Definition at line 491 of file tcp_bbr.h.

◆ BBR_OPTS_INC

#define BBR_OPTS_INC (   name)    BBR_OPTS_ADD(name, 1)

Definition at line 492 of file tcp_bbr.h.

◆ BBR_OPTS_SIZE

#define BBR_OPTS_SIZE   (sizeof(struct bbr_stats)/sizeof(uint64_t))

Definition at line 489 of file tcp_bbr.h.

◆ BBR_OVERMAX

#define BBR_OVERMAX
Value:
0x0008 /* We have more retran's then we can
* fit */

Definition at line 36 of file tcp_bbr.h.

◆ BBR_PERSISTS_FROM_1

#define BBR_PERSISTS_FROM_1   1

Definition at line 131 of file tcp_bbr.h.

◆ BBR_PERSISTS_FROM_2

#define BBR_PERSISTS_FROM_2   2

Definition at line 132 of file tcp_bbr.h.

◆ BBR_PERSISTS_FROM_3

#define BBR_PERSISTS_FROM_3   3

Definition at line 133 of file tcp_bbr.h.

◆ BBR_PERSISTS_FROM_4

#define BBR_PERSISTS_FROM_4   4

Definition at line 134 of file tcp_bbr.h.

◆ BBR_PERSISTS_FROM_5

#define BBR_PERSISTS_FROM_5   5

Definition at line 135 of file tcp_bbr.h.

◆ BBR_PROBERTT_MAX

#define BBR_PROBERTT_MAX   200 /* 200ms */

Definition at line 319 of file tcp_bbr.h.

◆ BBR_PROBERTT_NUM_MSS

#define BBR_PROBERTT_NUM_MSS   4

Definition at line 320 of file tcp_bbr.h.

◆ BBR_RECOVERY_EXTREMERTT

#define BBR_RECOVERY_EXTREMERTT   4

Definition at line 501 of file tcp_bbr.h.

◆ BBR_RECOVERY_HIGHRTT

#define BBR_RECOVERY_HIGHRTT   3

Definition at line 500 of file tcp_bbr.h.

◆ BBR_RECOVERY_LOWRTT

#define BBR_RECOVERY_LOWRTT   1

Definition at line 498 of file tcp_bbr.h.

◆ BBR_RECOVERY_MEDRTT

#define BBR_RECOVERY_MEDRTT   2

Definition at line 499 of file tcp_bbr.h.

◆ BBR_RED_BW_CONGSIG

#define BBR_RED_BW_CONGSIG   0 /* We enter recovery and set using b/w */

Definition at line 111 of file tcp_bbr.h.

◆ BBR_RED_BW_PE_CLAFDEL

#define BBR_RED_BW_PE_CLAFDEL
Value:
5 /* We are clearing it on schedule
* delayed */

Definition at line 116 of file tcp_bbr.h.

◆ BBR_RED_BW_PE_CLREARLY

#define BBR_RED_BW_PE_CLREARLY
Value:
4 /* We have decided to clear the
* reduction early */

Definition at line 115 of file tcp_bbr.h.

◆ BBR_RED_BW_PE_NOEARLY_OUT

#define BBR_RED_BW_PE_NOEARLY_OUT
Value:
7 /* Set pkt epoch judged that we do not
* get out of jail early */

Definition at line 118 of file tcp_bbr.h.

◆ BBR_RED_BW_RATECAL

#define BBR_RED_BW_RATECAL   1 /* We are calculating the loss rate */

Definition at line 112 of file tcp_bbr.h.

◆ BBR_RED_BW_REC_ENDCLL

#define BBR_RED_BW_REC_ENDCLL
Value:
6 /* Recover exits save high if needed
* an clear to start measuring */

Definition at line 117 of file tcp_bbr.h.

◆ BBR_RED_BW_SETHIGHLOSS

#define BBR_RED_BW_SETHIGHLOSS
Value:
3 /* We have set our highloss value at
* exit from probe-rtt */

Definition at line 114 of file tcp_bbr.h.

◆ BBR_RED_BW_USELRBW

#define BBR_RED_BW_USELRBW
Value:
2 /* We are dropping the lower b/w with
* cDR */

Definition at line 113 of file tcp_bbr.h.

◆ BBR_REDUCE_AT_FR

#define BBR_REDUCE_AT_FR   5

Definition at line 353 of file tcp_bbr.h.

◆ BBR_RS_BW_EMPTY

#define BBR_RS_BW_EMPTY   0x00000002 /* Nothing yet stored in cDR */

Definition at line 159 of file tcp_bbr.h.

◆ BBR_RS_BW_VAILD

#define BBR_RS_BW_VAILD   0x00000008 /* We have a valid cDR */

Definition at line 161 of file tcp_bbr.h.

◆ BBR_RS_EMPTY

#define BBR_RS_EMPTY   (BBR_RS_RTT_EMPTY|BBR_RS_BW_EMPTY)

Definition at line 162 of file tcp_bbr.h.

◆ BBR_RS_RTT_EMPTY

#define BBR_RS_RTT_EMPTY   0x00000001 /* Nothing yet stored in RTT's */

Definition at line 158 of file tcp_bbr.h.

◆ BBR_RS_RTT_VALID

#define BBR_RS_RTT_VALID   0x00000004 /* We have at least one valid RTT */

Definition at line 160 of file tcp_bbr.h.

◆ BBR_RT_FLAG_CAPPED

#define BBR_RT_FLAG_CAPPED   0x08 /* Measurement is capped */

Definition at line 202 of file tcp_bbr.h.

◆ BBR_RT_FLAG_CAPPED_PRE

#define BBR_RT_FLAG_CAPPED_PRE   0x04 /* Ready to cap if we send the next segment */

Definition at line 201 of file tcp_bbr.h.

◆ BBR_RT_FLAG_FREE

#define BBR_RT_FLAG_FREE   0x00 /* Is on the free list */

Definition at line 198 of file tcp_bbr.h.

◆ BBR_RT_FLAG_INUSE

#define BBR_RT_FLAG_INUSE   0x01 /* Has been allocated */

Definition at line 199 of file tcp_bbr.h.

◆ BBR_RT_FLAG_LIMITED

#define BBR_RT_FLAG_LIMITED   0x20 /* Saw application/cwnd or rwnd limited period */

Definition at line 204 of file tcp_bbr.h.

◆ BBR_RT_FLAG_PASTFA

#define BBR_RT_FLAG_PASTFA   0x10 /* Past the first ack. */

Definition at line 203 of file tcp_bbr.h.

◆ BBR_RT_FLAG_READY

#define BBR_RT_FLAG_READY   0x02 /* Ready to initiate a measurement. */

Definition at line 200 of file tcp_bbr.h.

◆ BBR_RT_PREV_RTT_SET

#define BBR_RT_PREV_RTT_SET   0x80 /* There was a RTT set in */

Definition at line 206 of file tcp_bbr.h.

◆ BBR_RT_PREV_SEND_TIME

#define BBR_RT_PREV_SEND_TIME
Value:
0x100 /*
*There was a RTT send time set that can be used
* no snd_limits
*/

Definition at line 207 of file tcp_bbr.h.

◆ BBR_RT_SEEN_A_ACK

#define BBR_RT_SEEN_A_ACK   0x40 /* A ack has been saved */

Definition at line 205 of file tcp_bbr.h.

◆ BBR_RT_SET_GRADIENT

#define BBR_RT_SET_GRADIENT   0x200

Definition at line 208 of file tcp_bbr.h.

◆ BBR_RT_TS_VALID

#define BBR_RT_TS_VALID   0x400

Definition at line 209 of file tcp_bbr.h.

◆ BBR_RTT_BY_EARLIER_RET

#define BBR_RTT_BY_EARLIER_RET   2

Definition at line 125 of file tcp_bbr.h.

◆ BBR_RTT_BY_EXACTMATCH

#define BBR_RTT_BY_EXACTMATCH   1

Definition at line 124 of file tcp_bbr.h.

◆ BBR_RTT_BY_SOME_RETRAN

#define BBR_RTT_BY_SOME_RETRAN   4

Definition at line 127 of file tcp_bbr.h.

◆ BBR_RTT_BY_THIS_RETRAN

#define BBR_RTT_BY_THIS_RETRAN   3

Definition at line 126 of file tcp_bbr.h.

◆ BBR_RTT_BY_TIMESTAMP

#define BBR_RTT_BY_TIMESTAMP   0

Definition at line 123 of file tcp_bbr.h.

◆ BBR_RTT_BY_TSMATCHING

#define BBR_RTT_BY_TSMATCHING   5

Definition at line 128 of file tcp_bbr.h.

◆ BBR_RTT_PKTRTT

#define BBR_RTT_PKTRTT   2

Definition at line 140 of file tcp_bbr.h.

◆ BBR_RTT_PROP

#define BBR_RTT_PROP   0

Definition at line 138 of file tcp_bbr.h.

◆ BBR_RTT_RACK

#define BBR_RTT_RACK   1

Definition at line 139 of file tcp_bbr.h.

◆ BBR_RTTS_ENTERPROBE

#define BBR_RTTS_ENTERPROBE   6

Definition at line 189 of file tcp_bbr.h.

◆ BBR_RTTS_INIT

#define BBR_RTTS_INIT   0

Definition at line 183 of file tcp_bbr.h.

◆ BBR_RTTS_LEAVE_DRAIN

#define BBR_RTTS_LEAVE_DRAIN   10

Definition at line 193 of file tcp_bbr.h.

◆ BBR_RTTS_NEW_TARGET

#define BBR_RTTS_NEW_TARGET   9

Definition at line 192 of file tcp_bbr.h.

◆ BBR_RTTS_NEWRTT

#define BBR_RTTS_NEWRTT   1

Definition at line 184 of file tcp_bbr.h.

◆ BBR_RTTS_PERSIST

#define BBR_RTTS_PERSIST   4

Definition at line 187 of file tcp_bbr.h.

◆ BBR_RTTS_REACHTAR

#define BBR_RTTS_REACHTAR   5

Definition at line 188 of file tcp_bbr.h.

◆ BBR_RTTS_RESETS_VALUES

#define BBR_RTTS_RESETS_VALUES   11

Definition at line 194 of file tcp_bbr.h.

◆ BBR_RTTS_RTTPROBE

#define BBR_RTTS_RTTPROBE   2

Definition at line 185 of file tcp_bbr.h.

◆ BBR_RTTS_SHRINK_PG

#define BBR_RTTS_SHRINK_PG   7

Definition at line 190 of file tcp_bbr.h.

◆ BBR_RTTS_SHRINK_PG_FINAL

#define BBR_RTTS_SHRINK_PG_FINAL   8

Definition at line 191 of file tcp_bbr.h.

◆ BBR_RTTS_WASIDLE

#define BBR_RTTS_WASIDLE   3

Definition at line 186 of file tcp_bbr.h.

◆ BBR_RWND_COLLAPSED

#define BBR_RWND_COLLAPSED   0x0400 /* The peer collapsed the rwnd on the segment */

Definition at line 43 of file tcp_bbr.h.

◆ BBR_RXT_CLEARED

#define BBR_RXT_CLEARED   0x0004 /* ACK Cleared by the RXT timer */

Definition at line 35 of file tcp_bbr.h.

◆ BBR_SACK_PASSED

#define BBR_SACK_PASSED   0x0010 /* A sack was done above this block */

Definition at line 37 of file tcp_bbr.h.

◆ BBR_SACKED

#define BBR_SACKED   0

Definition at line 143 of file tcp_bbr.h.

◆ BBR_SCALE

#define BBR_SCALE   8

Definition at line 312 of file tcp_bbr.h.

◆ BBR_SECONDS_NO_RTT

#define BBR_SECONDS_NO_RTT   10 /* 10 seconds with no RTT shrinkage */

Definition at line 318 of file tcp_bbr.h.

◆ BBR_SEES_COMPRESSED_ACKS

#define BBR_SEES_COMPRESSED_ACKS   2

Definition at line 276 of file tcp_bbr.h.

◆ BBR_SEES_STRETCH_ACK

#define BBR_SEES_STRETCH_ACK   1

Definition at line 275 of file tcp_bbr.h.

◆ BBR_SEGMENT_TIME_SIZE

#define BBR_SEGMENT_TIME_SIZE   1500 /* How many bytes in time_between */

Definition at line 103 of file tcp_bbr.h.

◆ BBR_SRTT

#define BBR_SRTT   3

Definition at line 141 of file tcp_bbr.h.

◆ BBR_STARTUP_EPOCHS

#define BBR_STARTUP_EPOCHS   3

Definition at line 321 of file tcp_bbr.h.

◆ BBR_STAT_ADD

#define BBR_STAT_ADD (   name,
  amm 
)    counter_u64_add(bbr_stat_arry[(offsetof(struct bbr_stats, name)/sizeof(uint64_t))], (amm))

Definition at line 487 of file tcp_bbr.h.

◆ BBR_STAT_INC

#define BBR_STAT_INC (   name)    BBR_STAT_ADD(name, 1)

Definition at line 488 of file tcp_bbr.h.

◆ BBR_STAT_SIZE

#define BBR_STAT_SIZE   (sizeof(struct bbr_stats)/sizeof(uint64_t))

Definition at line 485 of file tcp_bbr.h.

◆ BBR_STATE_DRAIN

#define BBR_STATE_DRAIN   0x02

Definition at line 336 of file tcp_bbr.h.

◆ BBR_STATE_IDLE_EXIT

#define BBR_STATE_IDLE_EXIT   0x05

Definition at line 339 of file tcp_bbr.h.

◆ BBR_STATE_PROBE_BW

#define BBR_STATE_PROBE_BW   0x03

Definition at line 337 of file tcp_bbr.h.

◆ BBR_STATE_PROBE_RTT

#define BBR_STATE_PROBE_RTT   0x04

Definition at line 338 of file tcp_bbr.h.

◆ BBR_STATE_STARTUP

#define BBR_STATE_STARTUP   0x01

Definition at line 335 of file tcp_bbr.h.

◆ BBR_SUB_DRAIN

#define BBR_SUB_DRAIN   1 /* State 1 where we are at 3/4 BBR_UNIT */

Definition at line 343 of file tcp_bbr.h.

◆ BBR_SUB_GAIN

#define BBR_SUB_GAIN   0 /* State 0 where we are 5/4 BBR_UNIT */

Definition at line 342 of file tcp_bbr.h.

◆ BBR_SUB_LEVEL1

#define BBR_SUB_LEVEL1   2 /* State 1 first BBR_UNIT */

Definition at line 344 of file tcp_bbr.h.

◆ BBR_SUB_LEVEL2

#define BBR_SUB_LEVEL2   3 /* State 2nd BBR_UNIT */

Definition at line 345 of file tcp_bbr.h.

◆ BBR_SUB_LEVEL3

#define BBR_SUB_LEVEL3   4 /* State 3rd BBR_UNIT */

Definition at line 346 of file tcp_bbr.h.

◆ BBR_SUB_LEVEL4

#define BBR_SUB_LEVEL4   5 /* State 4th BBR_UNIT */

Definition at line 347 of file tcp_bbr.h.

◆ BBR_SUB_LEVEL5

#define BBR_SUB_LEVEL5   6 /* State 5th BBR_UNIT */

Definition at line 348 of file tcp_bbr.h.

◆ BBR_SUB_LEVEL6

#define BBR_SUB_LEVEL6   7 /* State last BBR_UNIT */

Definition at line 349 of file tcp_bbr.h.

◆ BBR_SUBSTATE_COUNT

#define BBR_SUBSTATE_COUNT   8

Definition at line 350 of file tcp_bbr.h.

◆ BBR_TIME_TO_MILLI

#define BBR_TIME_TO_MILLI (   a)    (a / MS_IN_USEC)

Definition at line 324 of file tcp_bbr.h.

◆ BBR_TIME_TO_SECONDS

#define BBR_TIME_TO_SECONDS (   a)    (a / USECS_IN_SECOND)

Definition at line 323 of file tcp_bbr.h.

◆ BBR_TIMER_FUDGE

#define BBR_TIMER_FUDGE   1500 /* 1.5ms in micro seconds */

Definition at line 108 of file tcp_bbr.h.

◆ BBR_TLP

#define BBR_TLP   0x0080 /* segment sent as tail-loss-probe */

Definition at line 40 of file tcp_bbr.h.

◆ BBR_TO_FRM_DELACK

#define BBR_TO_FRM_DELACK   6

Definition at line 273 of file tcp_bbr.h.

◆ BBR_TO_FRM_KEEP

#define BBR_TO_FRM_KEEP   4

Definition at line 271 of file tcp_bbr.h.

◆ BBR_TO_FRM_PERSIST

#define BBR_TO_FRM_PERSIST   5

Definition at line 272 of file tcp_bbr.h.

◆ BBR_TO_FRM_RACK

#define BBR_TO_FRM_RACK   3

Definition at line 270 of file tcp_bbr.h.

◆ BBR_TO_FRM_TLP

#define BBR_TO_FRM_TLP   2

Definition at line 269 of file tcp_bbr.h.

◆ BBR_TO_FRM_TMR

#define BBR_TO_FRM_TMR   1

Definition at line 268 of file tcp_bbr.h.

◆ BBR_TS_TO_MS

#define BBR_TS_TO_MS (   t)    ((t+999)/MS_IN_USEC)

Definition at line 327 of file tcp_bbr.h.

◆ BBR_UNIT

#define BBR_UNIT   (1 << BBR_SCALE)

Definition at line 313 of file tcp_bbr.h.

◆ BBR_WAS_RENEGED

#define BBR_WAS_RENEGED   0x0002 /* The peer reneged the ack */

Definition at line 34 of file tcp_bbr.h.

◆ BBR_WAS_SACKPASS

#define BBR_WAS_SACKPASS   0x0020 /* We retransmitted due to SACK pass */

Definition at line 38 of file tcp_bbr.h.

◆ MAX_REDUCE_RXT

#define MAX_REDUCE_RXT
Value:
3 /* What is the maximum times we are willing to
* reduce b/w in RTX's. Setting this has a
* multiplicative effect e.g. if we are
* reducing by 20% then setting it to 3 means
* you will have reduced the b/w estimate by >
* 60% before you stop. */

Definition at line 150 of file tcp_bbr.h.

◆ TT_BBR_FR_TMR

#define TT_BBR_FR_TMR   0x2001

Definition at line 310 of file tcp_bbr.h.

◆ USECS_IN_MSEC

#define USECS_IN_MSEC   1000

Definition at line 322 of file tcp_bbr.h.

Function Documentation

◆ __aligned()

struct bbr_sendmap __aligned ( CACHE_LINE_SIZE  )

◆ TAILQ_ENTRY()

TAILQ_ENTRY ( bbr_sendmap  )

◆ TAILQ_HEAD()

TAILQ_HEAD ( bbr_head  ,
bbr_sendmap   
)

Variable Documentation

◆ __aligned

struct bbr_rtt_sample __aligned

◆ alloc_limit_reported

uint8_t alloc_limit_reported

Definition at line 74 of file tcp_bbr.h.

◆ bbr_attempt_hdwr_pace

uint8_t bbr_attempt_hdwr_pace

Definition at line 22 of file tcp_bbr.h.

◆ bbr_hdrw_pacing

uint8_t bbr_hdrw_pacing

Definition at line 23 of file tcp_bbr.h.

◆ bbr_hdw_pace_ena

uint8_t bbr_hdw_pace_ena

Definition at line 24 of file tcp_bbr.h.

◆ bbr_init_win_cheat

uint8_t bbr_init_win_cheat

Definition at line 21 of file tcp_bbr.h.

◆ bbr_opts_arry

counter_u64_t bbr_opts_arry[BBR_OPTS_SIZE]
extern

Definition at line 430 of file bbr.c.

Referenced by bbr_counter_destroy(), bbr_init_sysctls(), and sysctl_bbr_clear_lost().

◆ bbr_prev_in_rec

uint8_t bbr_prev_in_rec

Definition at line 25 of file tcp_bbr.h.

◆ bbr_segs_rcvd

uint16_t bbr_segs_rcvd

Definition at line 17 of file tcp_bbr.h.

◆ bbr_stat_arry

counter_u64_t bbr_stat_arry[BBR_STAT_SIZE]
extern

Definition at line 429 of file bbr.c.

Referenced by bbr_counter_destroy(), bbr_init_sysctls(), and sysctl_bbr_clear_lost().

◆ bbr_timer_src

uint8_t bbr_timer_src

Definition at line 19 of file tcp_bbr.h.

◆ bbr_use_rack_cheat

uint8_t bbr_use_rack_cheat

Definition at line 20 of file tcp_bbr.h.

◆ gain_is_limited

uint16_t gain_is_limited

Definition at line 11 of file tcp_bbr.h.

◆ hw_pacing_set

uint16_t hw_pacing_set

Definition at line 14 of file tcp_bbr.h.

◆ no_pacing_until

uint16_t no_pacing_until

Definition at line 8 of file tcp_bbr.h.

◆ oerror_cnt

uint16_t oerror_cnt

Definition at line 13 of file tcp_bbr.h.

◆ output_error_seen

uint16_t output_error_seen

Definition at line 12 of file tcp_bbr.h.

◆ pkt_conservation

uint8_t pkt_conservation

Definition at line 26 of file tcp_bbr.h.

◆ r_agg_early_set

uint8_t r_agg_early_set

Definition at line 47 of file tcp_bbr.h.

◆ r_app_limited

uint8_t r_app_limited

Definition at line 13 of file tcp_bbr.h.

◆ r_bbr_state

uint8_t r_bbr_state

Definition at line 19 of file tcp_bbr.h.

◆ r_ctl

◆ r_del_ack_ts

uint32_t r_del_ack_ts

Definition at line 24 of file tcp_bbr.h.

◆ r_del_time

uint32_t r_del_time

Definition at line 8 of file tcp_bbr.h.

◆ r_delivered

uint32_t r_delivered

Definition at line 6 of file tcp_bbr.h.

◆ r_dupack

uint8_t r_dupack

Definition at line 15 of file tcp_bbr.h.

◆ r_end

uint32_t r_end

Definition at line 3 of file tcp_bbr.h.

◆ r_first_sent_time

uint32_t r_first_sent_time

Definition at line 32 of file tcp_bbr.h.

◆ r_flags

uint16_t r_flags

Definition at line 22 of file tcp_bbr.h.

◆ r_flight_at_send

uint32_t r_flight_at_send

Definition at line 34 of file tcp_bbr.h.

◆ r_in_tmap

uint8_t r_in_tmap

Definition at line 16 of file tcp_bbr.h.

◆ r_init_rtt

uint8_t r_init_rtt

Definition at line 48 of file tcp_bbr.h.

◆ r_is_drain

uint8_t r_is_drain

Definition at line 12 of file tcp_bbr.h.

◆ r_is_gain

uint8_t r_is_gain

Definition at line 18 of file tcp_bbr.h.

◆ r_is_smallmap

uint8_t r_is_smallmap

Definition at line 17 of file tcp_bbr.h.

◆ r_is_v6

uint8_t r_is_v6

Definition at line 60 of file tcp_bbr.h.

◆ r_limit_type

uint8_t r_limit_type

Definition at line 20 of file tcp_bbr.h.

◆ r_pacing_delay

uint32_t r_pacing_delay

Definition at line 33 of file tcp_bbr.h.

◆ r_recovery_bw

uint8_t r_recovery_bw

Definition at line 50 of file tcp_bbr.h.

◆ r_rtr_bytes

uint32_t r_rtr_bytes

Definition at line 5 of file tcp_bbr.h.

◆ r_rtr_cnt

uint8_t r_rtr_cnt

Definition at line 9 of file tcp_bbr.h.

◆ r_rtt_not_allowed

uint8_t r_rtt_not_allowed

Definition at line 11 of file tcp_bbr.h.

Referenced by bbr_clone_rsm().

◆ r_spare16

uint16_t r_spare16

Definition at line 23 of file tcp_bbr.h.

◆ r_start

uint32_t r_start

Definition at line 2 of file tcp_bbr.h.

◆ r_state

uint8_t r_state

Definition at line 46 of file tcp_bbr.h.

◆ r_substate

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) ( struct mbuf *  ,
struct tcphdr *  ,
struct socket *  ,
struct tcpcb ,
struct tcpopt ,
int32_t  ,
int32_t  ,
uint32_t  ,
int32_t  ,
int32_t  ,
uint8_t   
)

Definition at line 1 of file tcp_bbr.h.

◆ r_tim_lastsent

uint32_t r_tim_lastsent[BBR_NUM_OF_RETRANS]

Definition at line 26 of file tcp_bbr.h.

◆ r_timer_override

uint8_t r_timer_override

Definition at line 51 of file tcp_bbr.h.

◆ r_ts_valid

uint8_t r_ts_valid

Definition at line 14 of file tcp_bbr.h.

◆ r_use_policer

uint8_t r_use_policer

Definition at line 49 of file tcp_bbr.h.

◆ r_wanted_output

uint16_t r_wanted_output

Definition at line 29 of file tcp_bbr.h.

◆ rc_ack_is_cumack

uint8_t rc_ack_is_cumack

Definition at line 72 of file tcp_bbr.h.

◆ rc_ack_was_delayed

uint16_t rc_ack_was_delayed

Definition at line 36 of file tcp_bbr.h.

◆ rc_all_timers_stopped

uint16_t rc_all_timers_stopped

Definition at line 34 of file tcp_bbr.h.

◆ rc_allow_data_af_clo

uint8_t rc_allow_data_af_clo

Definition at line 54 of file tcp_bbr.h.

◆ rc_bbr_state

uint8_t rc_bbr_state

Definition at line 58 of file tcp_bbr.h.

◆ rc_bbr_substate

uint8_t rc_bbr_substate

Definition at line 59 of file tcp_bbr.h.

◆ rc_cwnd_limited

uint8_t rc_cwnd_limited

Definition at line 65 of file tcp_bbr.h.

◆ rc_filled_pipe

uint16_t rc_filled_pipe

Definition at line 38 of file tcp_bbr.h.

◆ rc_has_collapsed

uint16_t rc_has_collapsed

Definition at line 44 of file tcp_bbr.h.

◆ rc_hit_state_1

uint16_t rc_hit_state_1

Definition at line 40 of file tcp_bbr.h.

◆ rc_in_persist

uint8_t rc_in_persist

Definition at line 52 of file tcp_bbr.h.

◆ rc_init_win

uint8_t rc_init_win

Definition at line 75 of file tcp_bbr.h.

◆ rc_inp

struct inpcb* rc_inp

Definition at line 5 of file tcp_bbr.h.

◆ rc_is_pkt_epoch_now

uint16_t rc_is_pkt_epoch_now

Definition at line 43 of file tcp_bbr.h.

◆ rc_last_options

uint8_t rc_last_options

Definition at line 62 of file tcp_bbr.h.

◆ rc_loss_exit

uint16_t rc_loss_exit

Definition at line 35 of file tcp_bbr.h.

◆ rc_lt_is_sampling

uint16_t rc_lt_is_sampling

Definition at line 37 of file tcp_bbr.h.

◆ rc_lt_use_bw

uint8_t rc_lt_use_bw

Definition at line 53 of file tcp_bbr.h.

◆ rc_max_rto_sec

uint8_t rc_max_rto_sec

Definition at line 64 of file tcp_bbr.h.

◆ rc_no_pacing

uint8_t rc_no_pacing

Definition at line 73 of file tcp_bbr.h.

◆ rc_output_starts_timer

uint16_t rc_output_starts_timer

Definition at line 32 of file tcp_bbr.h.

◆ rc_pacer_started

uint32_t rc_pacer_started

Definition at line 7 of file tcp_bbr.h.

◆ rc_past_init_win

uint8_t rc_past_init_win

Definition at line 61 of file tcp_bbr.h.

◆ rc_prtt_set_ts

uint16_t rc_prtt_set_ts

Definition at line 42 of file tcp_bbr.h.

◆ rc_resends_use_tso

uint16_t rc_resends_use_tso

Definition at line 33 of file tcp_bbr.h.

◆ rc_timer_first

uint16_t rc_timer_first

Definition at line 31 of file tcp_bbr.h.

◆ rc_tlp_in_progress

uint8_t rc_tlp_in_progress

Definition at line 56 of file tcp_bbr.h.

◆ rc_tlp_new_data

uint16_t rc_tlp_new_data

Definition at line 39 of file tcp_bbr.h.

◆ rc_tlp_rtx_out

uint8_t rc_tlp_rtx_out

Definition at line 55 of file tcp_bbr.h.

◆ rc_tlp_threshold

uint8_t rc_tlp_threshold

Definition at line 63 of file tcp_bbr.h.

◆ rc_tmr_stopped

uint8_t rc_tmr_stopped

Definition at line 66 of file tcp_bbr.h.

◆ rc_tp

struct tcpcb* rc_tp

Definition at line 4 of file tcp_bbr.h.

◆ rc_ts_cant_be_used

uint8_t rc_ts_cant_be_used

Definition at line 71 of file tcp_bbr.h.

◆ rc_ts_clock_set

uint8_t rc_ts_clock_set

Definition at line 70 of file tcp_bbr.h.

◆ rc_ts_data_set

uint8_t rc_ts_data_set

Definition at line 69 of file tcp_bbr.h.

◆ rc_ts_valid

uint16_t rc_ts_valid

Definition at line 41 of file tcp_bbr.h.

◆ rc_tv

struct timeval rc_tv

Definition at line 6 of file tcp_bbr.h.

◆ rc_use_google

uint8_t rc_use_google

Definition at line 67 of file tcp_bbr.h.

◆ rc_use_idle_restart

uint8_t rc_use_idle_restart

Definition at line 57 of file tcp_bbr.h.

◆ rc_use_ts_limit

uint8_t rc_use_ts_limit

Definition at line 68 of file tcp_bbr.h.

◆ rtt_valid

uint16_t rtt_valid

Definition at line 30 of file tcp_bbr.h.

◆ skip_gain

uint16_t skip_gain

Definition at line 10 of file tcp_bbr.h.

◆ ts_can_raise

uint16_t ts_can_raise

Definition at line 9 of file tcp_bbr.h.

◆ use_policer_detection

uint8_t use_policer_detection

Definition at line 27 of file tcp_bbr.h.

◆ xxx_bbr_hdw_pace_idx

uint8_t xxx_bbr_hdw_pace_idx

Definition at line 28 of file tcp_bbr.h.

◆ xxx_r_ack_count

uint16_t xxx_r_ack_count

Definition at line 15 of file tcp_bbr.h.