Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_var.h
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | typedef enum { | ||||
TT_PERSIST, | TT_PERSIST, | ||||
TT_KEEP, | TT_KEEP, | ||||
TT_2MSL, | TT_2MSL, | ||||
TT_N, | TT_N, | ||||
} tt_which; | } tt_which; | ||||
/* | /* | ||||
* Tcp control block, one per tcp connection. | * Tcp control block, one per tcp connection. | ||||
*/ | */ | ||||
rgrimes: Be aware this is a cache optimized data structure. | |||||
struct tcpcb { | struct tcpcb { | ||||
struct inpcb t_inpcb; /* embedded protocol indepenent cb */ | struct inpcb t_inpcb; /* embedded protocol indepenent cb */ | ||||
#define t_start_zero t_fb | #define t_start_zero t_fb | ||||
#define t_zero_size (sizeof(struct tcpcb) - \ | #define t_zero_size (sizeof(struct tcpcb) - \ | ||||
offsetof(struct tcpcb, t_start_zero)) | offsetof(struct tcpcb, t_start_zero)) | ||||
struct tcp_function_block *t_fb;/* TCP function call block */ | struct tcp_function_block *t_fb;/* TCP function call block */ | ||||
void *t_fb_ptr; /* Pointer to t_fb specific data */ | void *t_fb_ptr; /* Pointer to t_fb specific data */ | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | #define t_zero_size (sizeof(struct tcpcb) - \ | ||||
u_int t_rttmin; /* minimum rtt allowed */ | u_int t_rttmin; /* minimum rtt allowed */ | ||||
int t_softerror; /* possible error not yet reported */ | int t_softerror; /* possible error not yet reported */ | ||||
uint32_t max_sndwnd; /* largest window peer has offered */ | uint32_t max_sndwnd; /* largest window peer has offered */ | ||||
uint32_t snd_cwnd_prev; /* cwnd prior to retransmit */ | uint32_t snd_cwnd_prev; /* cwnd prior to retransmit */ | ||||
uint32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */ | uint32_t snd_ssthresh_prev; /* ssthresh prior to retransmit */ | ||||
tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ | tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ | ||||
int t_sndzerowin; /* zero-window updates sent */ | int t_sndzerowin; /* zero-window updates sent */ | ||||
u_long t_rttupdated; /* number of times rtt sampled */ | |||||
int snd_numholes; /* number of holes seen by sender */ | int snd_numholes; /* number of holes seen by sender */ | ||||
u_int t_badrxtwin; /* window for retransmit recovery */ | u_int t_badrxtwin; /* window for retransmit recovery */ | ||||
TAILQ_HEAD(sackhole_head, sackhole) snd_holes; | TAILQ_HEAD(sackhole_head, sackhole) snd_holes; | ||||
/* SACK scoreboard (sorted) */ | /* SACK scoreboard (sorted) */ | ||||
tcp_seq snd_fack; /* last seq number(+1) sack'd by rcv'r*/ | tcp_seq snd_fack; /* last seq number(+1) sack'd by rcv'r*/ | ||||
struct sackblk sackblks[MAX_SACK_BLKS]; /* seq nos. of sack blocks */ | struct sackblk sackblks[MAX_SACK_BLKS]; /* seq nos. of sack blocks */ | ||||
struct sackhint sackhint; /* SACK scoreboard hint */ | struct sackhint sackhint; /* SACK scoreboard hint */ | ||||
int t_rttlow; /* smallest observerved RTT */ | int t_rttlow; /* smallest observerved RTT */ | ||||
Show All 21 Lines | #define t_zero_size (sizeof(struct tcpcb) - \ | ||||
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 */ | ||||
tcp_seq gput_seq; /* Outbound measurement seq */ | tcp_seq gput_seq; /* Outbound measurement seq */ | ||||
tcp_seq gput_ack; /* Inbound measurement ack */ | tcp_seq gput_ack; /* Inbound measurement ack */ | ||||
int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */ | int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */ | ||||
uint32_t t_maxpeakrate; /* max peak rate set by user, bytes/s */ | uint32_t t_maxpeakrate; /* max peak rate set by user, bytes/s */ | ||||
Done Inline ActionsChanging the size of and location of this value is going to undo the comment about this structure being carefully cache aligned, though I do not know if that comment is still true. rgrimes: Changing the size of and location of this value is going to undo the comment about this… | |||||
uint32_t t_sndtlppack; /* tail loss probe packets sent */ | uint32_t t_sndtlppack; /* tail loss probe packets sent */ | ||||
uint64_t t_sndtlpbyte; /* total tail loss probe bytes sent */ | uint64_t t_sndtlpbyte; /* total tail loss probe bytes sent */ | ||||
uint64_t t_sndbytes; /* total bytes sent */ | uint64_t t_sndbytes; /* total bytes sent */ | ||||
uint64_t t_snd_rxt_bytes; /* total bytes retransmitted */ | uint64_t t_snd_rxt_bytes; /* total bytes retransmitted */ | ||||
uint32_t t_dsack_bytes; /* dsack bytes received */ | uint32_t t_dsack_bytes; /* dsack bytes received */ | ||||
uint32_t t_dsack_tlp_bytes; /* dsack bytes received for TLPs sent */ | uint32_t t_dsack_tlp_bytes; /* dsack bytes received for TLPs sent */ | ||||
uint32_t t_dsack_pack; /* dsack packets we have eceived */ | uint32_t t_dsack_pack; /* dsack packets we have eceived */ | ||||
uint8_t t_rttupdated; /* number of times rtt sampled */ | |||||
/* TCP Fast Open */ | /* TCP Fast Open */ | ||||
uint8_t t_tfo_client_cookie_len; /* TFO client cookie length */ | uint8_t t_tfo_client_cookie_len; /* TFO client cookie length */ | ||||
uint32_t t_end_info_status; /* Status flag of end info */ | uint32_t t_end_info_status; /* Status flag of end info */ | ||||
unsigned int *t_tfo_pending; /* TFO server pending counter */ | unsigned int *t_tfo_pending; /* TFO server pending counter */ | ||||
union { | union { | ||||
uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; | uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; | ||||
uint64_t server; | uint64_t server; | ||||
} t_tfo_cookie; /* TCP Fast Open cookie to send */ | } t_tfo_cookie; /* TCP Fast Open cookie to send */ | ||||
▲ Show 20 Lines • Show All 422 Lines • ▼ Show 20 Lines | struct tcpstat { | ||||
uint64_t tcps_persisttimeo; /* persist timeouts */ | uint64_t tcps_persisttimeo; /* persist timeouts */ | ||||
uint64_t tcps_keeptimeo; /* keepalive timeouts */ | uint64_t tcps_keeptimeo; /* keepalive timeouts */ | ||||
uint64_t tcps_keepprobe; /* keepalive probes sent */ | uint64_t tcps_keepprobe; /* keepalive probes sent */ | ||||
uint64_t tcps_keepdrops; /* connections dropped in keepalive */ | uint64_t tcps_keepdrops; /* connections dropped in keepalive */ | ||||
uint64_t tcps_progdrops; /* drops due to no progress */ | uint64_t tcps_progdrops; /* drops due to no progress */ | ||||
uint64_t tcps_sndtotal; /* total packets sent */ | uint64_t tcps_sndtotal; /* total packets sent */ | ||||
uint64_t tcps_sndpack; /* data packets sent */ | uint64_t tcps_sndpack; /* data packets sent */ | ||||
uint64_t tcps_sndbyte; /* data bytes sent */ | uint64_t tcps_sndbyte; /* data bytes sent */ | ||||
Not Done Inline ActionsAh, now this explains why I could not find CEILINC on my 12.1 machine... This set of macros and usage should probably be discussed on the -arch mailling list. This is a general mechanism and should probably be considered on a grander scale and by a wider audiance than just netinet stuff rgrimes: Ah, now this explains why I could not find CEILINC on my 12.1 machine... This set of macros and… | |||||
uint64_t tcps_sndrexmitpack; /* data packets retransmitted */ | uint64_t tcps_sndrexmitpack; /* data packets retransmitted */ | ||||
uint64_t tcps_sndrexmitbyte; /* data bytes retransmitted */ | uint64_t tcps_sndrexmitbyte; /* data bytes retransmitted */ | ||||
uint64_t tcps_sndrexmitbad; /* unnecessary packet retransmissions */ | uint64_t tcps_sndrexmitbad; /* unnecessary packet retransmissions */ | ||||
uint64_t tcps_sndacks; /* ack-only packets sent */ | uint64_t tcps_sndacks; /* ack-only packets sent */ | ||||
uint64_t tcps_sndprobe; /* window probes sent */ | uint64_t tcps_sndprobe; /* window probes sent */ | ||||
uint64_t tcps_sndurg; /* packets sent with URG only */ | uint64_t tcps_sndurg; /* packets sent with URG only */ | ||||
uint64_t tcps_sndwinup; /* window update-only packets sent */ | uint64_t tcps_sndwinup; /* window update-only packets sent */ | ||||
uint64_t tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */ | uint64_t tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */ | ||||
▲ Show 20 Lines • Show All 575 Lines • Show Last 20 Lines |
Be aware this is a cache optimized data structure.