tcp: replace cnt & rtt with struct in pkts_acked()
Replace 2 arguments (cnt and rtt) in the congestion control modules' pkts_acked() function with a struct. This will allow adding more information without having to modify existing congestion control modules (tcp_nv in particular needs bytes in flight when packet was sent). As proposed by Neal Cardwell in his comments to the tcp_nv patch. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cf88585b1d
commit
756ee1729b
@@ -107,16 +107,16 @@ EXPORT_SYMBOL_GPL(tcp_vegas_init);
|
||||
* o min-filter RTT samples from a much longer window (forever for now)
|
||||
* to find the propagation delay (baseRTT)
|
||||
*/
|
||||
void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us)
|
||||
void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample)
|
||||
{
|
||||
struct vegas *vegas = inet_csk_ca(sk);
|
||||
u32 vrtt;
|
||||
|
||||
if (rtt_us < 0)
|
||||
if (sample->rtt_us < 0)
|
||||
return;
|
||||
|
||||
/* Never allow zero rtt or baseRTT */
|
||||
vrtt = rtt_us + 1;
|
||||
vrtt = sample->rtt_us + 1;
|
||||
|
||||
/* Filter to find propagation delay: */
|
||||
if (vrtt < vegas->baseRTT)
|
||||
|
Reference in New Issue
Block a user