Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_var.h
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | struct sackhint { | ||||
int32_t sacked_bytes; /* Total sacked bytes reported by the | int32_t sacked_bytes; /* Total sacked bytes reported by the | ||||
* receiver via sack option | * receiver via sack option | ||||
*/ | */ | ||||
uint32_t recover_fs; /* Flight Size at the start of Loss recovery */ | uint32_t recover_fs; /* Flight Size at the start of Loss recovery */ | ||||
uint32_t prr_delivered; /* Total bytes delivered using PRR */ | uint32_t prr_delivered; /* Total bytes delivered using PRR */ | ||||
uint32_t prr_out; /* Bytes sent during IN_RECOVERY */ | uint32_t prr_out; /* Bytes sent during IN_RECOVERY */ | ||||
}; | }; | ||||
struct accecn { | |||||
uint32_t re0b; /* Number of ECT0 marked data bytes */ | |||||
uint32_t re1b; /* Number of ECT1 marked data bytes */ | |||||
uint32_t rceb; /* Number of CE marked data bytes */ | |||||
uint32_t se0b; /* Synced number of delivered ECT0 bytes */ | |||||
uint32_t se1b; /* Synced number of delivered ECT1 bytes */ | |||||
uint32_t sceb; /* Synced number of delivered CE bytes */ | |||||
}; | |||||
#define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq) | #define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq) | ||||
STAILQ_HEAD(tcp_log_stailq, tcp_log_mem); | STAILQ_HEAD(tcp_log_stailq, tcp_log_mem); | ||||
/* | /* | ||||
* Tcp control block, one per tcp; fields: | * Tcp control block, one per tcp; fields: | ||||
* Organized for 64 byte cacheline efficiency based | * Organized for 64 byte cacheline efficiency based | ||||
* on common tcp_input/tcp_output processing. | * on common tcp_input/tcp_output processing. | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | struct tcpcb { | ||||
u_int t_keepidle; /* time before keepalive probes begin */ | u_int t_keepidle; /* time before keepalive probes begin */ | ||||
u_int t_keepintvl; /* interval between keepalives */ | u_int t_keepintvl; /* interval between keepalives */ | ||||
u_int t_keepcnt; /* number of keepalives before close */ | u_int t_keepcnt; /* number of keepalives before close */ | ||||
int t_dupacks; /* consecutive dup acks recd */ | int t_dupacks; /* consecutive dup acks recd */ | ||||
int t_lognum; /* Number of log entries */ | int t_lognum; /* Number of log entries */ | ||||
int t_loglimit; /* Maximum number of log entries */ | int t_loglimit; /* Maximum number of log entries */ | ||||
uint32_t t_rcep; /* Number of received CE marked pkts */ | uint32_t t_rcep; /* Number of received CE marked pkts */ | ||||
uint32_t t_scep; /* Synced number of delivered CE pkts */ | uint32_t t_scep; /* Synced number of delivered CE pkts */ | ||||
struct accecn t_ae; /* AccECN related byte counters */ | |||||
int64_t t_pacing_rate; /* bytes / sec, -1 => unlimited */ | int64_t t_pacing_rate; /* bytes / sec, -1 => unlimited */ | ||||
struct tcp_log_stailq t_logs; /* Log buffer */ | struct tcp_log_stailq t_logs; /* Log buffer */ | ||||
struct tcp_log_id_node *t_lin; | struct tcp_log_id_node *t_lin; | ||||
struct tcp_log_id_bucket *t_lib; | struct tcp_log_id_bucket *t_lib; | ||||
const char *t_output_caller; /* Function that called tcp_output */ | const char *t_output_caller; /* Function that called tcp_output */ | ||||
struct statsblob *t_stats; /* Per-connection stats */ | struct statsblob *t_stats; /* Per-connection stats */ | ||||
uint32_t t_logsn; /* Log "serial number" */ | uint32_t t_logsn; /* Log "serial number" */ | ||||
uint32_t gput_ts; /* Time goodput measurement started */ | uint32_t gput_ts; /* Time goodput measurement started */ | ||||
▲ Show 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | |||||
#define TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ | #define TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ | ||||
#define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ | #define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ | ||||
#define TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */ | #define TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */ | ||||
#define TF2_DROP_AF_DATA 0x00000010 /* Drop after all data ack'd */ | #define TF2_DROP_AF_DATA 0x00000010 /* Drop after all data ack'd */ | ||||
#define TF2_ECN_PERMIT 0x00000020 /* connection ECN-ready */ | #define TF2_ECN_PERMIT 0x00000020 /* connection ECN-ready */ | ||||
#define TF2_ECN_SND_CWR 0x00000040 /* ECN CWR in queue */ | #define TF2_ECN_SND_CWR 0x00000040 /* ECN CWR in queue */ | ||||
#define TF2_ECN_SND_ECE 0x00000080 /* ECN ECE in queue */ | #define TF2_ECN_SND_ECE 0x00000080 /* ECN ECE in queue */ | ||||
#define TF2_ACE_PERMIT 0x00000100 /* Accurate ECN mode */ | #define TF2_ACE_PERMIT 0x00000100 /* Accurate ECN mode */ | ||||
#define TF2_FBYTES_COMPLETE 0x00000400 /* We have first bytes in and out */ | #define TF2_ACO_E0 0x00000200 /* EE0 counter changed */ | ||||
#define TF2_ACO_E1 0x00000400 /* EE1 counter changed */ | |||||
#define TF2_ACO_CE 0x00000800 /* ECE counter changed */ | |||||
#define TF2_FBYTES_COMPLETE 0x00001000 /* We have first bytes in and out */ | |||||
/* | /* | ||||
* Structure to hold TCP options that are only used during segment | * Structure to hold TCP options that are only used during segment | ||||
* processing (in tcp_input), but not held in the tcpcb. | * processing (in tcp_input), but not held in the tcpcb. | ||||
* It's basically used to reduce the number of parameters | * It's basically used to reduce the number of parameters | ||||
* to tcp_dooptions and tcp_addoptions. | * to tcp_dooptions and tcp_addoptions. | ||||
* The binary order of the to_flags is relevant for packing of the | * The binary order of the to_flags is relevant for packing of the | ||||
* options in tcp_addoptions. | * options in tcp_addoptions. | ||||
*/ | */ | ||||
struct tcpopt { | struct tcpopt { | ||||
u_int32_t to_flags; /* which options are present */ | u_int32_t to_flags; /* which options are present */ | ||||
#define TOF_MSS 0x0001 /* maximum segment size */ | #define TOF_MSS 0x00000001 /* maximum segment size */ | ||||
#define TOF_SCALE 0x0002 /* window scaling */ | #define TOF_SCALE 0x00000002 /* window scaling */ | ||||
#define TOF_SACKPERM 0x0004 /* SACK permitted */ | #define TOF_SACKPERM 0x00000004 /* SACK permitted */ | ||||
#define TOF_TS 0x0010 /* timestamp */ | #define TOF_TS 0x00000010 /* timestamp */ | ||||
#define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ | #define TOF_SIGNATURE 0x00000040 /* TCP-MD5 signature option (RFC2385) */ | ||||
#define TOF_SACK 0x0080 /* Peer sent SACK option */ | #define TOF_SACK 0x00000080 /* Peer sent SACK option */ | ||||
#define TOF_FASTOPEN 0x0100 /* TCP Fast Open (TFO) cookie */ | #define TOF_FASTOPEN 0x00000100 /* TCP Fast Open (TFO) cookie */ | ||||
#define TOF_MAXOPT 0x0200 | #define TOF_ACCECNOPT 0x00000200 /* AccECN Option */ | ||||
#define TOF_MAXOPT 0x00000400 | |||||
/* Keep internal flags above TOF_MAXOPT */ | |||||
#define TOF_ACCE_SYN 0x80000000 /* send empty option */ | |||||
#define TOF_ACCE_CE 0x40000000 /* CE counter changed */ | |||||
#define TOF_ACCE_E0 0x20000000 /* E0 counter changed */ | |||||
#define TOF_ACCE_E1 0x10000000 /* E1 counter changed */ | |||||
#define TOF_ACCE_ACKNOW 0x08000000 /* send full option */ | |||||
u_int32_t to_tsval; /* new timestamp */ | u_int32_t to_tsval; /* new timestamp */ | ||||
u_int32_t to_tsecr; /* reflected timestamp */ | u_int32_t to_tsecr; /* reflected timestamp */ | ||||
u_char *to_sacks; /* pointer to the first SACK blocks */ | u_char *to_sacks; /* pointer to the first SACK blocks */ | ||||
u_char *to_signature; /* pointer to the TCP-MD5 signature */ | u_char *to_signature; /* pointer to the TCP-MD5 signature */ | ||||
u_int8_t *to_tfo_cookie; /* pointer to the TFO cookie */ | u_int8_t *to_tfo_cookie; /* pointer to the TFO cookie */ | ||||
u_int16_t to_mss; /* maximum segment size */ | u_int16_t to_mss; /* maximum segment size */ | ||||
u_int8_t to_wscale; /* window scaling */ | u_int8_t to_wscale; /* window scaling */ | ||||
u_int8_t to_nsacks; /* number of SACK blocks */ | u_int8_t to_nsacks; /* number of SACK blocks */ | ||||
u_int8_t to_tfo_len; /* TFO cookie length */ | u_int8_t to_tfo_len; /* TFO cookie length */ | ||||
struct accecn *to_ae; /* pointer to AccECN byte counters */ | |||||
u_int32_t to_spare; /* UTO */ | u_int32_t to_spare; /* UTO */ | ||||
}; | }; | ||||
/* | /* | ||||
* Flags for tcp_dooptions. | * Flags for tcp_dooptions. | ||||
*/ | */ | ||||
#define TO_SYN 0x01 /* parse SYN-only options */ | #define TO_SYN 0x01 /* parse SYN-only options */ | ||||
struct hc_metrics_lite { /* must stay in sync with hc_metrics */ | struct hc_metrics_lite { /* must stay in sync with hc_metrics */ | ||||
▲ Show 20 Lines • Show All 374 Lines • ▼ Show 20 Lines | |||||
VNET_DECLARE(int, tcp_tolerate_missing_ts); | VNET_DECLARE(int, tcp_tolerate_missing_ts); | ||||
VNET_DECLARE(int, tcp_do_rfc3042); | VNET_DECLARE(int, tcp_do_rfc3042); | ||||
VNET_DECLARE(int, tcp_do_rfc3390); | VNET_DECLARE(int, tcp_do_rfc3390); | ||||
VNET_DECLARE(int, tcp_do_rfc3465); | VNET_DECLARE(int, tcp_do_rfc3465); | ||||
VNET_DECLARE(int, tcp_do_newsack); | VNET_DECLARE(int, tcp_do_newsack); | ||||
VNET_DECLARE(int, tcp_do_sack); | VNET_DECLARE(int, tcp_do_sack); | ||||
VNET_DECLARE(int, tcp_do_tso); | VNET_DECLARE(int, tcp_do_tso); | ||||
VNET_DECLARE(int, tcp_ecn_maxretries); | VNET_DECLARE(int, tcp_ecn_maxretries); | ||||
VNET_DECLARE(int, tcp_ecn_option); | |||||
VNET_DECLARE(int, tcp_initcwnd_segments); | VNET_DECLARE(int, tcp_initcwnd_segments); | ||||
VNET_DECLARE(int, tcp_insecure_rst); | VNET_DECLARE(int, tcp_insecure_rst); | ||||
VNET_DECLARE(int, tcp_insecure_syn); | VNET_DECLARE(int, tcp_insecure_syn); | ||||
VNET_DECLARE(uint32_t, tcp_map_entries_limit); | VNET_DECLARE(uint32_t, tcp_map_entries_limit); | ||||
VNET_DECLARE(uint32_t, tcp_map_split_limit); | VNET_DECLARE(uint32_t, tcp_map_split_limit); | ||||
VNET_DECLARE(int, tcp_minmss); | VNET_DECLARE(int, tcp_minmss); | ||||
VNET_DECLARE(int, tcp_mssdflt); | VNET_DECLARE(int, tcp_mssdflt); | ||||
#ifdef STATS | #ifdef STATS | ||||
Show All 30 Lines | |||||
#define V_tcp_ts_offset_per_conn VNET(tcp_ts_offset_per_conn) | #define V_tcp_ts_offset_per_conn VNET(tcp_ts_offset_per_conn) | ||||
#define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) | #define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) | ||||
#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) | #define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) | ||||
#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) | #define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) | ||||
#define V_tcp_do_newsack VNET(tcp_do_newsack) | #define V_tcp_do_newsack VNET(tcp_do_newsack) | ||||
#define V_tcp_do_sack VNET(tcp_do_sack) | #define V_tcp_do_sack VNET(tcp_do_sack) | ||||
#define V_tcp_do_tso VNET(tcp_do_tso) | #define V_tcp_do_tso VNET(tcp_do_tso) | ||||
#define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) | #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) | ||||
#define V_tcp_ecn_option VNET(tcp_ecn_option) | |||||
#define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) | #define V_tcp_initcwnd_segments VNET(tcp_initcwnd_segments) | ||||
#define V_tcp_insecure_rst VNET(tcp_insecure_rst) | #define V_tcp_insecure_rst VNET(tcp_insecure_rst) | ||||
#define V_tcp_insecure_syn VNET(tcp_insecure_syn) | #define V_tcp_insecure_syn VNET(tcp_insecure_syn) | ||||
#define V_tcp_map_entries_limit VNET(tcp_map_entries_limit) | #define V_tcp_map_entries_limit VNET(tcp_map_entries_limit) | ||||
#define V_tcp_map_split_limit VNET(tcp_map_split_limit) | #define V_tcp_map_split_limit VNET(tcp_map_split_limit) | ||||
#define V_tcp_minmss VNET(tcp_minmss) | #define V_tcp_minmss VNET(tcp_minmss) | ||||
#define V_tcp_mssdflt VNET(tcp_mssdflt) | #define V_tcp_mssdflt VNET(tcp_mssdflt) | ||||
#ifdef STATS | #ifdef STATS | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |