* 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. */
| 235 | * the value of cwnd at the last congestion event. |
| 236 | */ |
| 237 | static __inline unsigned long |
| 238 | tf_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_ */ |
no outgoing calls
no test coverage detected