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

Go to the source code of this file.

Macros

#define TCP_MSS_ACCT_JUSTRET   0
 
#define TCP_MSS_ACCT_SNDACK   1
 
#define TCP_MSS_ACCT_PERSIST   2
 
#define TCP_MSS_ACCT_ATIMER   60
 
#define TCP_MSS_ACCT_INPACE   61
 
#define TCP_MSS_ACCT_LATE   62
 
#define TCP_MSS_SMALL_SIZE_OFF   63 /* Point where small sizes enter */
 
#define TCP_MSS_ACCT_SIZE   70
 
#define TCP_MSS_SMALL_MAX_SIZE_DIV   (TCP_MSS_ACCT_SIZE - TCP_MSS_SMALL_SIZE_OFF)
 
#define DUP_ACK_THRESHOLD   3
 
#define PROGRESS_DROP   1
 
#define PROGRESS_UPDATE   2
 
#define PROGRESS_CLEAR   3
 
#define PROGRESS_START   4
 
#define CTF_JR_SENT_DATA   0
 
#define CTF_JR_CWND_LIMITED   1
 
#define CTF_JR_RWND_LIMITED   2
 
#define CTF_JR_APP_LIMITED   3
 
#define CTF_JR_ASSESSING   4
 
#define CTF_JR_PERSISTS   5
 
#define CTF_JR_PRR   6
 
#define BBR_JR_SENT_DATA   CTF_JR_SENT_DATA
 
#define BBR_JR_CWND_LIMITED   CTF_JR_CWND_LIMITED
 
#define BBR_JR_RWND_LIMITED   CTF_JR_RWND_LIMITED
 
#define BBR_JR_APP_LIMITED   CTF_JR_APP_LIMITED
 
#define BBR_JR_ASSESSING   CTF_JR_ASSESSING
 
#define BBR_JR_PERSISTS   CTF_JR_PERSISTS
 
#define BBR_JR_PRR   CTF_JR_PRR
 
#define USE_RTT_HIGH   0
 
#define USE_RTT_LOW   1
 
#define USE_RTT_AVG   2
 
#define PACE_MAX_IP_BYTES   65536
 
#define USECS_IN_SECOND   1000000
 
#define MSEC_IN_SECOND   1000
 
#define MS_IN_USEC   1000
 
#define USEC_TO_MSEC(x)   (x / MS_IN_USEC)
 
#define TCP_TS_OVERHEAD   12 /* Overhead of having Timestamps on */
 
#define FORTY_EIGHT_MBPS   6000000 /* 48 megabits in bytes */
 
#define THIRTY_MBPS   3750000 /* 30 megabits in bytes */
 
#define TWENTY_THREE_MBPS   2896000 /* 23 megabits in bytes */
 
#define FIVETWELVE_MBPS   64000000 /* 512 megabits in bytes */
 
#define ONE_POINT_TWO_MEG   150000 /* 1.2 megabits in bytes */
 
#define ctf_drop_checks(a, b, c, d, e, f, g, h)   _ctf_drop_checks(a, b, c, d, e, f, g, h, NULL, NULL)
 
#define ctf_do_dropafterack(a, b, c, d, e, f)   __ctf_do_dropafterack(a, b, c, d, e, f, NULL, NULL)
 
#define ctf_process_rst(m, t, s, p)   __ctf_process_rst(m, t, s, p, NULL, NULL)
 

Functions

 CTASSERT ((PACE_TMR_MASK &0x80)==0)
 
int ctf_process_inbound_raw (struct tcpcb *tp, struct socket *so, struct mbuf *m, int has_pkt)
 
int ctf_do_queued_segments (struct socket *so, struct tcpcb *tp, int have_pkt)
 
uint32_t ctf_outstanding (struct tcpcb *tp)
 
uint32_t ctf_flight_size (struct tcpcb *tp, uint32_t rc_sacked)
 
int _ctf_drop_checks (struct tcpopt *to, struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t *tlenp, int32_t *thf, int32_t *drop_hdrlen, int32_t *ret_val, uint32_t *ts, uint32_t *cnt)
 
void ctf_ack_war_checks (struct tcpcb *tp, uint32_t *ts, uint32_t *cnt)
 
void __ctf_do_dropafterack (struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t thflags, int32_t tlen, int32_t *ret_val, uint32_t *ts, uint32_t *cnt)
 
void ctf_do_dropwithreset (struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen)
 
void ctf_do_drop (struct mbuf *m, struct tcpcb *tp)
 
int __ctf_process_rst (struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcpcb *tp, uint32_t *ts, uint32_t *cnt)
 
void ctf_challenge_ack (struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t *ret_val)
 
int ctf_ts_check (struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t tlen, int32_t thflags, int32_t *ret_val)
 
int ctf_ts_check_ac (struct tcpcb *tp, int32_t thflags)
 
void ctf_calc_rwin (struct socket *so, struct tcpcb *tp)
 
void ctf_do_dropwithreset_conn (struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t rstreason, int32_t tlen)
 
uint32_t ctf_fixed_maxseg (struct tcpcb *tp)
 
void ctf_log_sack_filter (struct tcpcb *tp, int num_sack_blks, struct sackblk *sack_blocks)
 
uint32_t ctf_decay_count (uint32_t count, uint32_t decay_percentage)
 
int32_t ctf_progress_timeout_check (struct tcpcb *tp, bool log)
 

Macro Definition Documentation

◆ BBR_JR_APP_LIMITED

#define BBR_JR_APP_LIMITED   CTF_JR_APP_LIMITED

Definition at line 63 of file rack_bbr_common.h.

◆ BBR_JR_ASSESSING

#define BBR_JR_ASSESSING   CTF_JR_ASSESSING

Definition at line 64 of file rack_bbr_common.h.

◆ BBR_JR_CWND_LIMITED

#define BBR_JR_CWND_LIMITED   CTF_JR_CWND_LIMITED

Definition at line 61 of file rack_bbr_common.h.

◆ BBR_JR_PERSISTS

#define BBR_JR_PERSISTS   CTF_JR_PERSISTS

Definition at line 65 of file rack_bbr_common.h.

◆ BBR_JR_PRR

#define BBR_JR_PRR   CTF_JR_PRR

Definition at line 66 of file rack_bbr_common.h.

◆ BBR_JR_RWND_LIMITED

#define BBR_JR_RWND_LIMITED   CTF_JR_RWND_LIMITED

Definition at line 62 of file rack_bbr_common.h.

◆ BBR_JR_SENT_DATA

#define BBR_JR_SENT_DATA   CTF_JR_SENT_DATA

Definition at line 60 of file rack_bbr_common.h.

◆ ctf_do_dropafterack

#define ctf_do_dropafterack (   a,
  b,
  c,
  d,
  e,
 
)    __ctf_do_dropafterack(a, b, c, d, e, f, NULL, NULL)

Definition at line 113 of file rack_bbr_common.h.

◆ ctf_drop_checks

#define ctf_drop_checks (   a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)    _ctf_drop_checks(a, b, c, d, e, f, g, h, NULL, NULL)

Definition at line 106 of file rack_bbr_common.h.

◆ CTF_JR_APP_LIMITED

#define CTF_JR_APP_LIMITED   3

Definition at line 54 of file rack_bbr_common.h.

◆ CTF_JR_ASSESSING

#define CTF_JR_ASSESSING   4

Definition at line 55 of file rack_bbr_common.h.

◆ CTF_JR_CWND_LIMITED

#define CTF_JR_CWND_LIMITED   1

Definition at line 52 of file rack_bbr_common.h.

◆ CTF_JR_PERSISTS

#define CTF_JR_PERSISTS   5

Definition at line 56 of file rack_bbr_common.h.

◆ CTF_JR_PRR

#define CTF_JR_PRR   6

Definition at line 57 of file rack_bbr_common.h.

◆ CTF_JR_RWND_LIMITED

#define CTF_JR_RWND_LIMITED   2

Definition at line 53 of file rack_bbr_common.h.

◆ CTF_JR_SENT_DATA

#define CTF_JR_SENT_DATA   0

Definition at line 51 of file rack_bbr_common.h.

◆ ctf_process_rst

#define ctf_process_rst (   m,
  t,
  s,
 
)    __ctf_process_rst(m, t, s, p, NULL, NULL)

Definition at line 124 of file rack_bbr_common.h.

◆ DUP_ACK_THRESHOLD

#define DUP_ACK_THRESHOLD   3

Definition at line 42 of file rack_bbr_common.h.

◆ FIVETWELVE_MBPS

#define FIVETWELVE_MBPS   64000000 /* 512 megabits in bytes */

Definition at line 84 of file rack_bbr_common.h.

◆ FORTY_EIGHT_MBPS

#define FORTY_EIGHT_MBPS   6000000 /* 48 megabits in bytes */

Definition at line 81 of file rack_bbr_common.h.

◆ MS_IN_USEC

#define MS_IN_USEC   1000

Definition at line 76 of file rack_bbr_common.h.

◆ MSEC_IN_SECOND

#define MSEC_IN_SECOND   1000

Definition at line 75 of file rack_bbr_common.h.

◆ ONE_POINT_TWO_MEG

#define ONE_POINT_TWO_MEG   150000 /* 1.2 megabits in bytes */

Definition at line 85 of file rack_bbr_common.h.

◆ PACE_MAX_IP_BYTES

#define PACE_MAX_IP_BYTES   65536

Definition at line 73 of file rack_bbr_common.h.

◆ PROGRESS_CLEAR

#define PROGRESS_CLEAR   3

Definition at line 47 of file rack_bbr_common.h.

◆ PROGRESS_DROP

#define PROGRESS_DROP   1

Definition at line 45 of file rack_bbr_common.h.

◆ PROGRESS_START

#define PROGRESS_START   4

Definition at line 48 of file rack_bbr_common.h.

◆ PROGRESS_UPDATE

#define PROGRESS_UPDATE   2

Definition at line 46 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_ATIMER

#define TCP_MSS_ACCT_ATIMER   60

Definition at line 35 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_INPACE

#define TCP_MSS_ACCT_INPACE   61

Definition at line 36 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_JUSTRET

#define TCP_MSS_ACCT_JUSTRET   0

Definition at line 32 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_LATE

#define TCP_MSS_ACCT_LATE   62

Definition at line 37 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_PERSIST

#define TCP_MSS_ACCT_PERSIST   2

Definition at line 34 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_SIZE

#define TCP_MSS_ACCT_SIZE   70

Definition at line 39 of file rack_bbr_common.h.

◆ TCP_MSS_ACCT_SNDACK

#define TCP_MSS_ACCT_SNDACK   1

Definition at line 33 of file rack_bbr_common.h.

◆ TCP_MSS_SMALL_MAX_SIZE_DIV

#define TCP_MSS_SMALL_MAX_SIZE_DIV   (TCP_MSS_ACCT_SIZE - TCP_MSS_SMALL_SIZE_OFF)

Definition at line 40 of file rack_bbr_common.h.

◆ TCP_MSS_SMALL_SIZE_OFF

#define TCP_MSS_SMALL_SIZE_OFF   63 /* Point where small sizes enter */

Definition at line 38 of file rack_bbr_common.h.

◆ TCP_TS_OVERHEAD

#define TCP_TS_OVERHEAD   12 /* Overhead of having Timestamps on */

Definition at line 78 of file rack_bbr_common.h.

◆ THIRTY_MBPS

#define THIRTY_MBPS   3750000 /* 30 megabits in bytes */

Definition at line 82 of file rack_bbr_common.h.

◆ TWENTY_THREE_MBPS

#define TWENTY_THREE_MBPS   2896000 /* 23 megabits in bytes */

Definition at line 83 of file rack_bbr_common.h.

◆ USE_RTT_AVG

#define USE_RTT_AVG   2

Definition at line 71 of file rack_bbr_common.h.

◆ USE_RTT_HIGH

#define USE_RTT_HIGH   0

Definition at line 69 of file rack_bbr_common.h.

◆ USE_RTT_LOW

#define USE_RTT_LOW   1

Definition at line 70 of file rack_bbr_common.h.

◆ USEC_TO_MSEC

#define USEC_TO_MSEC (   x)    (x / MS_IN_USEC)

Definition at line 77 of file rack_bbr_common.h.

◆ USECS_IN_SECOND

#define USECS_IN_SECOND   1000000

Definition at line 74 of file rack_bbr_common.h.

Function Documentation

◆ __ctf_do_dropafterack()

void __ctf_do_dropafterack ( struct mbuf *  m,
struct tcpcb tp,
struct tcphdr *  th,
int32_t  thflags,
int32_t  tlen,
int32_t *  ret_val,
uint32_t ts,
uint32_t cnt 
)

Definition at line 724 of file rack_bbr_common.c.

References BANDLIM_RST_OPENPORT, ctf_ack_war_checks(), ctf_do_dropwithreset(), SEQ_GT, tcpcb::snd_max, tcpcb::snd_una, tcpcb::t_state, and TCPS_SYN_RECEIVED.

Referenced by _ctf_drop_checks(), and rack_process_ack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ctf_process_rst()

◆ _ctf_drop_checks()

int _ctf_drop_checks ( struct tcpopt to,
struct mbuf *  m,
struct tcphdr *  th,
struct tcpcb tp,
int32_t *  tlenp,
int32_t *  thf,
int32_t *  drop_hdrlen,
int32_t *  ret_val,
uint32_t ts,
uint32_t cnt 
)

◆ CTASSERT()

CTASSERT ( (PACE_TMR_MASK &0x80)  = =0)

◆ ctf_ack_war_checks()

void ctf_ack_war_checks ( struct tcpcb tp,
uint32_t ts,
uint32_t cnt 
)

Definition at line 579 of file rack_bbr_common.c.

References tcpcb::t_flags, tcp_ack_war_cnt, tcp_ack_war_time_window, tcp_ts_getticks(), TF_ACKNOW, and TSTMP_LT.

Referenced by __ctf_do_dropafterack(), _ctf_drop_checks(), and rack_do_compressed_ack_processing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctf_calc_rwin()

◆ ctf_challenge_ack()

void ctf_challenge_ack ( struct mbuf *  m,
struct tcphdr *  th,
struct tcpcb tp,
int32_t *  ret_val 
)

◆ ctf_decay_count()

uint32_t ctf_decay_count ( uint32_t  count,
uint32_t  decay_percentage 
)

Definition at line 1019 of file rack_bbr_common.c.

References count.

Referenced by rack_do_decay().

Here is the caller graph for this function:

◆ ctf_do_drop()

◆ ctf_do_dropwithreset()

void ctf_do_dropwithreset ( struct mbuf *  m,
struct tcpcb tp,
struct tcphdr *  th,
int32_t  rstreason,
int32_t  tlen 
)

◆ ctf_do_dropwithreset_conn()

void ctf_do_dropwithreset_conn ( struct mbuf *  m,
struct tcpcb tp,
struct tcphdr *  th,
int32_t  rstreason,
int32_t  tlen 
)

◆ ctf_do_queued_segments()

int ctf_do_queued_segments ( struct socket *  so,
struct tcpcb tp,
int  have_pkt 
)

Definition at line 527 of file rack_bbr_common.c.

References ctf_process_inbound_raw(), tcpcb::t_in_pkt, and tcpcb::t_tail_pkt.

Referenced by bbr_do_segment(), and rack_do_segment().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctf_fixed_maxseg()

◆ ctf_flight_size()

◆ ctf_log_sack_filter()

void ctf_log_sack_filter ( struct tcpcb tp,
int  num_sack_blks,
struct sackblk sack_blocks 
)

◆ ctf_outstanding()

◆ ctf_process_inbound_raw()

int ctf_process_inbound_raw ( struct tcpcb tp,
struct socket *  so,
struct mbuf *  m,
int  has_pkt 
)

◆ ctf_progress_timeout_check()

◆ ctf_ts_check()

int ctf_ts_check ( struct mbuf *  m,
struct tcphdr *  th,
struct tcpcb tp,
int32_t  tlen,
int32_t  thflags,
int32_t *  ret_val 
)

◆ ctf_ts_check_ac()

int ctf_ts_check_ac ( struct tcpcb tp,
int32_t  thflags 
)

Definition at line 926 of file rack_bbr_common.c.

References KMOD_TCPSTAT_INC, TCP_PAWS_IDLE, tcp_ts_getticks(), tcpcb::ts_recent, and tcpcb::ts_recent_age.

Referenced by rack_do_compressed_ack_processing().

Here is the call graph for this function:
Here is the caller graph for this function: