* Re: [PATCH net-next] tcp: expose both send and receive intervals for rate sample
[not found] <CAKOGndb391n16rVhudpf4C5TWPikE7Oj9LywZ4f-v_YCr=Be=g@mail.gmail.com>
@ 2018-07-09 16:23 ` Yuchung Cheng
2018-07-09 17:02 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Yuchung Cheng @ 2018-07-09 16:23 UTC (permalink / raw)
To: Deepti Raghavan; +Cc: David Miller, netdev, Eric Dumazet, Neal Cardwell
On Mon, Jul 9, 2018 at 9:05 AM, Deepti Raghavan <deeptir@mit.edu> wrote:
> Congestion control algorithms, which access the rate sample
> through the tcp_cong_control function, only have access to the maximum
> of the send and receive interval, for cases where the acknowledgment
> rate may be inaccurate due to ACK compression or decimation. Algorithms
> may want to use send rates and receive rates as separate signals.
>
> Signed-off-by: Deepti Raghavan <deeptir@mit.edu>
Acked-by: Yuchung Cheng <ycheng@google.com>
> ---
> include/net/tcp.h | 2 ++
> net/ipv4/tcp_rate.c | 4 ++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index cce3769..f6cb20e 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -954,6 +954,8 @@ struct rate_sample {
> u32 prior_delivered; /* tp->delivered at "prior_mstamp" */
> s32 delivered; /* number of packets delivered over interval */
> long interval_us; /* time for tp->delivered to incr "delivered" */
> + u32 snd_interval_us; /* snd interval for delivered packets */
> + u32 rcv_interval_us; /* rcv interval for delivered packets */
> long rtt_us; /* RTT of last (S)ACKed packet (or -1) */
> int losses; /* number of packets marked lost upon ACK */
> u32 acked_sacked; /* number of packets newly (S)ACKed upon ACK */
> diff --git a/net/ipv4/tcp_rate.c b/net/ipv4/tcp_rate.c
> index c61240e..4dff40d 100644
> --- a/net/ipv4/tcp_rate.c
> +++ b/net/ipv4/tcp_rate.c
> @@ -146,6 +146,10 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32
> lost,
> rs->prior_mstamp); /* ack phase */
> rs->interval_us = max(snd_us, ack_us);
>
> + /* Record both segment send and ack receive intervals */
> + rs->snd_interval_us = snd_us;
> + rs->rcv_interval_us = ack_us;
> +
> /* Normally we expect interval_us >= min-rtt.
> * Note that rate may still be over-estimated when a spuriously
> * retransmistted skb was first (s)acked because "interval_us"
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net-next] tcp: expose both send and receive intervals for rate sample
2018-07-09 16:23 ` [PATCH net-next] tcp: expose both send and receive intervals for rate sample Yuchung Cheng
@ 2018-07-09 17:02 ` Eric Dumazet
0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2018-07-09 17:02 UTC (permalink / raw)
To: Yuchung Cheng, Deepti Raghavan
Cc: David Miller, netdev, Eric Dumazet, Neal Cardwell
On 07/09/2018 09:23 AM, Yuchung Cheng wrote:
> On Mon, Jul 9, 2018 at 9:05 AM, Deepti Raghavan <deeptir@mit.edu> wrote:
>> Congestion control algorithms, which access the rate sample
>> through the tcp_cong_control function, only have access to the maximum
>> of the send and receive interval, for cases where the acknowledgment
>> rate may be inaccurate due to ACK compression or decimation. Algorithms
>> may want to use send rates and receive rates as separate signals.
>>
>> Signed-off-by: Deepti Raghavan <deeptir@mit.edu>
> Acked-by: Yuchung Cheng <ycheng@google.com>
Okay, but please send a non HTML mail, otherwise the mail does not reach netdev@,
nor https://patchwork.ozlabs.org/project/netdev/list/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next] tcp: expose both send and receive intervals for rate sample
@ 2018-07-09 17:53 Deepti Raghavan
2018-07-09 18:09 ` Neal Cardwell
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Deepti Raghavan @ 2018-07-09 17:53 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Deepti Raghavan
Congestion control algorithms, which access the rate sample
through the tcp_cong_control function, only have access to the maximum
of the send and receive interval, for cases where the acknowledgment
rate may be inaccurate due to ACK compression or decimation. Algorithms
may want to use send rates and receive rates as separate signals.
Signed-off-by: Deepti Raghavan <deeptir@mit.edu>
---
include/net/tcp.h | 2 ++
net/ipv4/tcp_rate.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index cce3769..f6cb20e 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -954,6 +954,8 @@ struct rate_sample {
u32 prior_delivered; /* tp->delivered at "prior_mstamp" */
s32 delivered; /* number of packets delivered over interval */
long interval_us; /* time for tp->delivered to incr "delivered" */
+ u32 snd_interval_us; /* snd interval for delivered packets */
+ u32 rcv_interval_us; /* rcv interval for delivered packets */
long rtt_us; /* RTT of last (S)ACKed packet (or -1) */
int losses; /* number of packets marked lost upon ACK */
u32 acked_sacked; /* number of packets newly (S)ACKed upon ACK */
diff --git a/net/ipv4/tcp_rate.c b/net/ipv4/tcp_rate.c
index c61240e..4dff40d 100644
--- a/net/ipv4/tcp_rate.c
+++ b/net/ipv4/tcp_rate.c
@@ -146,6 +146,10 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
rs->prior_mstamp); /* ack phase */
rs->interval_us = max(snd_us, ack_us);
+ /* Record both segment send and ack receive intervals */
+ rs->snd_interval_us = snd_us;
+ rs->rcv_interval_us = ack_us;
+
/* Normally we expect interval_us >= min-rtt.
* Note that rate may still be over-estimated when a spuriously
* retransmistted skb was first (s)acked because "interval_us"
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH net-next] tcp: expose both send and receive intervals for rate sample
2018-07-09 17:53 Deepti Raghavan
@ 2018-07-09 18:09 ` Neal Cardwell
2018-07-09 18:11 ` Eric Dumazet
2018-07-12 6:02 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Neal Cardwell @ 2018-07-09 18:09 UTC (permalink / raw)
To: deeptir; +Cc: David Miller, Netdev
On Mon, Jul 9, 2018 at 1:58 PM Deepti Raghavan <deeptir@mit.edu> wrote:
>
> Congestion control algorithms, which access the rate sample
> through the tcp_cong_control function, only have access to the maximum
> of the send and receive interval, for cases where the acknowledgment
> rate may be inaccurate due to ACK compression or decimation. Algorithms
> may want to use send rates and receive rates as separate signals.
>
> Signed-off-by: Deepti Raghavan <deeptir@mit.edu>
> ---
> include/net/tcp.h | 2 ++
> net/ipv4/tcp_rate.c | 4 ++++
> 2 files changed, 6 insertions(+)
Thanks for re-sending. It does seem to be showing up in patchwork now:
https://patchwork.ozlabs.org/patch/941532/
And I can confirm I'm able to apply it to net-next.
Acked-by: Neal Cardwell <ncardwell@google.com>
thanks,
neal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] tcp: expose both send and receive intervals for rate sample
2018-07-09 17:53 Deepti Raghavan
2018-07-09 18:09 ` Neal Cardwell
@ 2018-07-09 18:11 ` Eric Dumazet
2018-07-12 6:02 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2018-07-09 18:11 UTC (permalink / raw)
To: Deepti Raghavan, David Miller; +Cc: netdev
On 07/09/2018 10:53 AM, Deepti Raghavan wrote:
> Congestion control algorithms, which access the rate sample
> through the tcp_cong_control function, only have access to the maximum
> of the send and receive interval, for cases where the acknowledgment
> rate may be inaccurate due to ACK compression or decimation. Algorithms
> may want to use send rates and receive rates as separate signals.
>
> Signed-off-by: Deepti Raghavan <deeptir@mit.edu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
(Assuming another CC is coming soon, using this...)
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] tcp: expose both send and receive intervals for rate sample
2018-07-09 17:53 Deepti Raghavan
2018-07-09 18:09 ` Neal Cardwell
2018-07-09 18:11 ` Eric Dumazet
@ 2018-07-12 6:02 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-07-12 6:02 UTC (permalink / raw)
To: deeptir; +Cc: netdev
From: Deepti Raghavan <deeptir@mit.edu>
Date: Mon, 9 Jul 2018 17:53:39 +0000
> Congestion control algorithms, which access the rate sample
> through the tcp_cong_control function, only have access to the maximum
> of the send and receive interval, for cases where the acknowledgment
> rate may be inaccurate due to ACK compression or decimation. Algorithms
> may want to use send rates and receive rates as separate signals.
>
> Signed-off-by: Deepti Raghavan <deeptir@mit.edu>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-12 6:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAKOGndb391n16rVhudpf4C5TWPikE7Oj9LywZ4f-v_YCr=Be=g@mail.gmail.com>
2018-07-09 16:23 ` [PATCH net-next] tcp: expose both send and receive intervals for rate sample Yuchung Cheng
2018-07-09 17:02 ` Eric Dumazet
2018-07-09 17:53 Deepti Raghavan
2018-07-09 18:09 ` Neal Cardwell
2018-07-09 18:11 ` Eric Dumazet
2018-07-12 6:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).