* [PATCH 06/29] Use skb timestamp for TX side
@ 2007-04-12 21:14 Arnaldo Carvalho de Melo
2007-04-12 21:21 ` David Miller
2007-04-12 21:52 ` Ian McDonald
0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2007-04-12 21:14 UTC (permalink / raw)
To: dccp
This patch uses skb timestamps (and provides the necessary enable/disable
mechanism) instead of layer-4 timestamping. This affords a more accurate
RTT estimation.
Background:
The sender currently computes the timestamp of received (Ack) packets when
the packet is delivered to layer 4. The skb timestamp is taken earlier, and
the differences are notable: dDuring test runs under different load conditions,
the layer-4 timestamp was observed to be on average up to 100 microseconds,
in the extreme up to a millisecond, later than the skb timestamp.
This has a negative impact on the RTT estimation (reduced accuracy).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
---
net/dccp/ccids/ccid3.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index b756e95..a20b636 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -469,7 +469,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
else /* can not exceed 100% */
hctx->ccid3hctx_p = 1000000 / pinv;
- do_gettimeofday(&now);
+ skb_get_timestamp(skb, &now);
/*
* Calculate new round trip sample as per [RFC 3448, 4.3] by
@@ -645,6 +645,7 @@ static int ccid3_hc_tx_init(struct ccid *ccid, struct sock *sk)
ccid3_hc_tx_no_feedback_timer;
hctx->ccid3hctx_no_feedback_timer.data = (unsigned long)sk;
init_timer(&hctx->ccid3hctx_no_feedback_timer);
+ net_enable_timestamp();
return 0;
}
@@ -657,6 +658,7 @@ static void ccid3_hc_tx_exit(struct sock *sk)
ccid3_hc_tx_set_state(sk, TFRC_SSTATE_TERM);
sk_stop_timer(sk, &hctx->ccid3hctx_no_feedback_timer);
+ net_disable_timestamp();
/* Empty packet history */
dccp_tx_hist_purge(ccid3_tx_hist, &hctx->ccid3hctx_hist);
--
1.5.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 06/29] Use skb timestamp for TX side
2007-04-12 21:14 [PATCH 06/29] Use skb timestamp for TX side Arnaldo Carvalho de Melo
@ 2007-04-12 21:21 ` David Miller
2007-04-12 21:52 ` Ian McDonald
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2007-04-12 21:21 UTC (permalink / raw)
To: dccp
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Date: Thu, 12 Apr 2007 18:14:46 -0300
> This patch uses skb timestamps (and provides the necessary enable/disable
> mechanism) instead of layer-4 timestamping. This affords a more accurate
> RTT estimation.
>
> Background:
>
> The sender currently computes the timestamp of received (Ack) packets when
> the packet is delivered to layer 4. The skb timestamp is taken earlier, and
> the differences are notable: dDuring test runs under different load conditions,
> the layer-4 timestamp was observed to be on average up to 100 microseconds,
> in the extreme up to a millisecond, later than the skb timestamp.
> This has a negative impact on the RTT estimation (reduced accuracy).
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This patch screws the entire system over with the overhead of
timestamping every packet processed as soon as there are DCCP sockets
using ccid3.
I'll pull this in for now, but you must find a better way before
I merge this to Linus for 2.6.22
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 06/29] Use skb timestamp for TX side
2007-04-12 21:14 [PATCH 06/29] Use skb timestamp for TX side Arnaldo Carvalho de Melo
2007-04-12 21:21 ` David Miller
@ 2007-04-12 21:52 ` Ian McDonald
1 sibling, 0 replies; 3+ messages in thread
From: Ian McDonald @ 2007-04-12 21:52 UTC (permalink / raw)
To: dccp
On 4/13/07, David Miller <davem@davemloft.net> wrote:
> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Date: Thu, 12 Apr 2007 18:14:46 -0300
>
> > This patch uses skb timestamps (and provides the necessary enable/disable
> > mechanism) instead of layer-4 timestamping. This affords a more accurate
> > RTT estimation.
> >
> > Background:
> >
> > The sender currently computes the timestamp of received (Ack) packets when
> > the packet is delivered to layer 4. The skb timestamp is taken earlier, and
> > the differences are notable: dDuring test runs under different load conditions,
> > the layer-4 timestamp was observed to be on average up to 100 microseconds,
> > in the extreme up to a millisecond, later than the skb timestamp.
> > This has a negative impact on the RTT estimation (reduced accuracy).
> >
> > Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
> > Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
>
> This patch screws the entire system over with the overhead of
> timestamping every packet processed as soon as there are DCCP sockets
> using ccid3.
>
> I'll pull this in for now, but you must find a better way before
> I merge this to Linus for 2.6.22
I think then that we revert this patch also. If there are genuine
races going on around time stamping (which was one of the arguments)
then we can implement our own locking where needed.
--
Web: http://wand.net.nz/~iam4/
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-12 21:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 21:14 [PATCH 06/29] Use skb timestamp for TX side Arnaldo Carvalho de Melo
2007-04-12 21:21 ` David Miller
2007-04-12 21:52 ` Ian McDonald
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.