MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tf_cwnd

Function tf_cwnd

freebsd/netinet/cc/cc_cubic.h:237–247  ·  view source on GitHub ↗

* Compute an approximation of the "TCP friendly" cwnd some number of ticks * after a congestion event that is designed to yield the same average cwnd as * NewReno while using CUBIC's beta of 0.7. RTT should be the average RTT * estimate for the path measured over the previous congestion epoch and wmax is * the value of cwnd at the last congestion event. */

Source from the content-addressed store, hash-verified

235 * the value of cwnd at the last congestion event.
236 */
237static __inline unsigned long
238tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax,
239 uint32_t smss)
240{
241
242 /* Equation 4 of I-D. */
243 return (((wmax * CUBIC_BETA) +
244 (((THREE_X_PT3 * (unsigned long)ticks_since_cong *
245 (unsigned long)smss) << CUBIC_SHIFT) / (TWO_SUB_PT3 * rtt_ticks)))
246 >> CUBIC_SHIFT);
247}
248
249#endif /* _NETINET_CC_CUBIC_H_ */

Callers 1

cubic_ack_receivedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected