diff options
Diffstat (limited to 'sys/netinet/cc/cc.h')
-rw-r--r-- | sys/netinet/cc/cc.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/netinet/cc/cc.h b/sys/netinet/cc/cc.h index aac0825e5fe1..890bea69a14b 100644 --- a/sys/netinet/cc/cc.h +++ b/sys/netinet/cc/cc.h @@ -87,21 +87,12 @@ int cc_deregister_algo(struct cc_algo *remove_cc); #endif /* _KERNEL */ #if defined(_KERNEL) || defined(_WANT_TCPCB) -/* - * Wrapper around transport structs that contain same-named congestion - * control variables. Allows algos to be shared amongst multiple CC aware - * transprots. - */ struct cc_var { void *cc_data; /* Per-connection private CC algorithm data. */ int bytes_this_ack; /* # bytes acked by the current ACK. */ tcp_seq curack; /* Most recent ACK. */ uint32_t flags; /* Flags for cc_var (see below) */ - int type; /* Indicates which ptr is valid in ccvc. */ - union ccv_container { - struct tcpcb *tcp; - struct sctp_nets *sctp; - } ccvc; + struct tcpcb *tp; /* Pointer to tcpcb */ uint16_t nsegs; /* # segments coalesced into current chain. */ uint8_t labc; /* Dont use system abc use passed in */ }; @@ -113,10 +104,10 @@ struct cc_var { #define CCF_ACKNOW 0x0008 /* Will this ack be sent now? */ #define CCF_IPHDR_CE 0x0010 /* Does this packet set CE bit? */ #define CCF_TCPHDR_CWR 0x0020 /* Does this packet set CWR bit? */ -#define CCF_MAX_CWND 0x0040 /* Have we reached maximum cwnd? */ -#define CCF_CHG_MAX_CWND 0x0080 /* CUBIC max_cwnd changed, for K */ -#define CCF_USR_IWND 0x0100 /* User specified initial window */ -#define CCF_USR_IWND_INIT_NSEG 0x0200 /* Convert segs to bytes on conn init */ +#define CCF_UNUSED1 0x0040 +#define CCF_UNUSED2 0x0080 +#define CCF_UNUSED3 0x0100 +#define CCF_UNUSED4 0x0200 #define CCF_HYSTART_ALLOWED 0x0400 /* If the CC supports it Hystart is allowed */ #define CCF_HYSTART_CAN_SH_CWND 0x0800 /* Can hystart when going CSS -> CA slam the cwnd */ #define CCF_HYSTART_CONS_SSTH 0x1000 /* Should hystart use the more conservative ssthresh */ @@ -240,6 +231,9 @@ void newreno_cc_post_recovery(struct cc_var *); void newreno_cc_after_idle(struct cc_var *); void newreno_cc_cong_signal(struct cc_var *, ccsignal_t); void newreno_cc_ack_received(struct cc_var *, ccsignal_t); +u_int newreno_cc_cwnd_on_multiplicative_decrease(struct cc_var *ccv, uint32_t mss); +u_int newreno_cc_cwnd_in_cong_avoid(struct cc_var *ccv); +u_int newreno_cc_cwnd_in_slow_start(struct cc_var *ccv); /* Called to temporarily keep an algo from going away during change */ void cc_refer(struct cc_algo *algo); |