diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2007-08-19 20:17:02 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:13 -0400 |
commit | 668348a4232d3dd0ee48b3dc13228b5a7eb57565 (patch) | |
tree | 901c41d72c9202a503333acf854d761cb6121e6e /net/dccp | |
parent | 9823b7b5542858afe5b6a1e2df83b3847c28f3d6 (diff) |
[DCCP] CCID3: Stop using dccp_timestamp
Now to convert the ackvec code to ktime_t so that we can get rid of
dccp_timestamp and the epoch thing in dccp_sock.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 3524328db0b9..6b12e9faef30 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -388,7 +388,6 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, | |||
388 | unsigned int len) | 388 | unsigned int len) |
389 | { | 389 | { |
390 | struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); | 390 | struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); |
391 | struct timeval now; | ||
392 | struct dccp_tx_hist_entry *packet; | 391 | struct dccp_tx_hist_entry *packet; |
393 | 392 | ||
394 | BUG_ON(hctx == NULL); | 393 | BUG_ON(hctx == NULL); |
@@ -402,8 +401,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, | |||
402 | } | 401 | } |
403 | dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, packet); | 402 | dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, packet); |
404 | 403 | ||
405 | dccp_timestamp(sk, &now); | 404 | packet->dccphtx_tstamp = ktime_to_timeval(ktime_get_real()); |
406 | packet->dccphtx_tstamp = now; | ||
407 | packet->dccphtx_seqno = dccp_sk(sk)->dccps_gss; | 405 | packet->dccphtx_seqno = dccp_sk(sk)->dccps_gss; |
408 | packet->dccphtx_rtt = hctx->ccid3hctx_rtt; | 406 | packet->dccphtx_rtt = hctx->ccid3hctx_rtt; |
409 | packet->dccphtx_sent = 1; | 407 | packet->dccphtx_sent = 1; |
@@ -729,8 +727,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) | |||
729 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); | 727 | struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); |
730 | struct dccp_sock *dp = dccp_sk(sk); | 728 | struct dccp_sock *dp = dccp_sk(sk); |
731 | struct dccp_rx_hist_entry *packet; | 729 | struct dccp_rx_hist_entry *packet; |
732 | struct timeval tnow; | 730 | ktime_t now, t_hist; |
733 | ktime_t now; | ||
734 | suseconds_t delta; | 731 | suseconds_t delta; |
735 | 732 | ||
736 | ccid3_pr_debug("%s(%p) - entry \n", dccp_role(sk), sk); | 733 | ccid3_pr_debug("%s(%p) - entry \n", dccp_role(sk), sk); |
@@ -765,8 +762,8 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) | |||
765 | hcrx->ccid3hcrx_bytes_recv = 0; | 762 | hcrx->ccid3hcrx_bytes_recv = 0; |
766 | 763 | ||
767 | /* Elapsed time information [RFC 4340, 13.2] in units of 10 * usecs */ | 764 | /* Elapsed time information [RFC 4340, 13.2] in units of 10 * usecs */ |
768 | tnow = ktime_to_timeval(now); | 765 | t_hist = timeval_to_ktime(packet->dccphrx_tstamp); |
769 | delta = timeval_delta(&tnow, &packet->dccphrx_tstamp); | 766 | delta = ktime_us_delta(now, t_hist); |
770 | DCCP_BUG_ON(delta < 0); | 767 | DCCP_BUG_ON(delta < 0); |
771 | hcrx->ccid3hcrx_elapsed_time = delta / 10; | 768 | hcrx->ccid3hcrx_elapsed_time = delta / 10; |
772 | 769 | ||